ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 ImageEnMView.GridWidth
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

John

USA
94 Posts

Posted - Nov 13 2012 :  12:07:45  Show Profile  Reply
Hello

Delphi XE2, Windows 64 bit, ImageEn 4.1.4

a) With ImageEnMView.GridWidth := 3 I would like to be able to load 8 images and have grid location #5 empty or null. Code snippet 1 below works fine if the second if statment is remarked out and all 8 images are loaded. However, if code snippet 2 is implemented and I try to either skip the #5 grid space (by remarking out the code folloiwng the second if statement) or use a null value in the #5 location the code fails.

Code Snippet 1
if formViewPhotographs.ImageEnMView1.MultiSelectedImagesCount = 8 then
begin
for I := 0 to 9 - 1 do
begin
formViewPhotographs.kbmMemTablePhotos.First;
formViewPhotographs.kbmMemTablePhotos.MoveBy(formViewPhotographs.ImageEnMView1.MultiSelectedImages[I]);

with ImageEnMView1 do
begin
InsertImage(I);
SetImageFromFile(I, tempPtPhotoPath + formViewPhotographs.kbmMemTablePhotos.FieldByName('FileName').AsString);
ImageBottomText[I].Caption := formViewPhotographs.kbmMemTablePhotos.FieldByName('EXIF_OriginalDate').AsString ;
end;
end;
end;


CodeSnippet 2
if formViewPhotographs.ImageEnMView1.MultiSelectedImagesCount = 8 then
begin
for I := 0 to 9 - 1 do
begin
formViewPhotographs.kbmMemTablePhotos.First;
formViewPhotographs.kbmMemTablePhotos.MoveBy(formViewPhotographs.ImageEnMView1.MultiSelectedImages[I]);

if I <> 4 then {second if statement}
begin
with ImageEnMView1 do
begin
InsertImage(I);
SetImageFromFile(I, tempPtPhotoPath + formViewPhotographs.kbmMemTablePhotos.FieldByName('FileName').AsString);
ImageBottomText[I].Caption := formViewPhotographs.kbmMemTablePhotos.FieldByName('EXIF_OriginalDate').AsString ;
end;
end
else
begin
with ImageEnMView1 do
begin
InsertImage(I);
SetImageFromFile(I, null);
end;
end;
end
end;


Suggestions?


b) in a 12/11/2011 post there were comments that the properties SelectionGridWidth and SelectionGridHeight were to be added to the ImageEnMView component with the next minor upgrade. Are there still plans to expose these properties?

TIA

John

fab

1310 Posts

Posted - Nov 14 2012 :  12:25:50  Show Profile  Reply
Why not just call InsertImage(I) without SetImageFromFile to leave "I" empty? SetImageFromFile(I, null) is not valid, of course.
Instead of SetImageFromFile(I, null), you could call SetImage(I, ThumbWidth, ThumbHeight, ie24RGB).

About (b) please could you past the topic link?
Go to Top of Page

John

USA
94 Posts

Posted - Nov 16 2012 :  06:17:46  Show Profile  Reply
Thanks for the solution to a)

The link to b) is
http://www.imageen.com/ieforum/topic.asp?TOPIC_ID=260&SearchTerms=gridwidth
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: