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
 How to make thumbs match width of TImageEnMView?
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

xequte

38127 Posts

Posted - Jun 07 2019 :  00:18:41  Show Profile  Reply
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
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: