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

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 ImageEnMView with newline

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
Michael Hofmann Posted - Oct 10 2026 : 04:20:22
Hi,
I would like to have the option to include 'line breaks' in ImageEnMView. e.g.:
Display images in a folder, but start a new row when the first letter of the filename changes
For 4 columns:
AImage1 AImage2 AImage3 AImage4
AImage5 AImage6
BImage1 BImage2 BImage3
CImage1...

Of course, if the size of the ImageEnMView is changed (number of columns), it should automatically adjust for the new column count. May be having the option to set a 'newline' tag to an Image to force the next image to start at column 0????

Thanks,
Michael
3   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Oct 13 2026 : 15:22:10
Nice one

Nigel
Xequte Software
www.imageen.com
Michael Hofmann Posted - Oct 12 2026 : 22:25:23
Thank you,
You can call it also 'groups', like in the download folder in windows explorer with headers 'yesterday', 'last week'...
Actually I got it to work. I add dummy images in the Resize event (below). And I add Headers in the ImageDraw event (not shown)
I populate the Mview manually from a TStringlist with filenames, with headers in the list to mark the beginning of a new group:
HEADER:Group1
filename1
filename2
HEADER:Group2
fileenam3
(see attached image)
But you can do it much better in a future version...

Michael


procedure TMHHPicEdit.ImageEnMView1Resize(Sender: TObject);
var
  cols,n,c,i,count,sel:integer;
  selfn:string;
begin
  Cols:=ImageEnMView1.CalcGridWidth;
  if cols<>CurrentColumns then
  begin
    ImageEnMView1.lockupdate;
    sel:=ImageEnMView1.selectedImage;
    selfn:=ImageEnMView1.ImageFilename[sel];// marks selected image
    // remove all dummy images
    for n:=ImageEnMView1.imagecount-1 downto 0 do
    begin
      if ImageEnMView1.imagetag[n]=-1 then
      begin
        ImageEnMView1.deleteimage(n);
      end;
    end;

    // add dummy images after 'line break' tag
    CurrentColumns:=cols;
    i:=0;
    n:=0;
    count:=ImageEnMView1.imagecount;
    repeat
      if ImageEnMView1.imagetag[n]=2 then
      begin
        c:=CurrentColumns-(n mod CurrentColumns)-1;
        for i:=0 to c-1 do
        begin
          ImageEnMView1.insertimage(n+1,10,10,ie24RGB,clwhite);
          ImageEnMView1.imagetag[n+1]:=-1;
          ImageEnMView1.ImageUserPointer[n+1]:=nil;
          inc(n);
        end;
      end;
      inc(n);
    until n>ImageEnMView1.imagecount-1;

    // search the selected and select it again
    for n:=0 to ImageEnMView1.imagecount-1 do
    begin
      if ImageEnMView1.ImageFilename[n]=selfn then
      begin
        ImageEnMView1.SelectedImage:=n;
        break;
      end;
    end;
    ImageEnMView1.unlockupdate;
  end;
end;


xequte Posted - Oct 12 2026 : 15:11:07
Hi Michael

There's not a method to do that at present, but it is a good suggestion, so I'll add it to the to-do list for a later version.

Nigel
Xequte Software
www.imageen.com