Author |
Topic  |
|
John
 
USA
94 Posts |
Posted - Nov 13 2012 : 12:07:45
|
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
|
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? |
 |
|
John
 
USA
94 Posts |
|
|
Topic  |
|
|
|