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
 How to make thumbs match width of TImageEnMView?

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
xequte Posted - Jun 07 2019 : 00:18:41
Width available is TImageEnView.ClientWidth

Read CurrentScrollBars to determine if vertical scrollbar is visible:

https://www.imageen.com/help/TImageEnMView.CurrentScrollBars.html

If visible then decrement width by scrollbar width:

https://www.imageen.com/help/TIEImageEnGlobalSettings.VScrollWidth.html


Example code:

procedure TForm1.ImageEnMView1Resize(Sender: TObject);
var
  w: integer;
begin
  w := ImageEnMView1.ClientWidth;
  if ImageEnMView1.CurrentScrollBars in [ ssVertical, ssBoth ] then
    dec( w, IEGlobalSettings().VScrollWidth );
  ImageEnMView1.SetThumbnailSize( w , MulDiv( w, 4, 3) );
end;



Nigel
Xequte Software
www.imageen.com