Note: You must be registered in order to post a reply. To register, click here. Registration is FREE!
T O P I C R E V I E W
PeterPanino
Posted - Oct 29 2017 : 08:36:21 I have set the width of my (one-column) TImageEnMView to fit its content:
But when it has a scrollbar (due to diminished height) then the scrollbar reduces its client width:
Isn't there a setting to keep the client width when TImageEnMView has a scrollbar? I.e., the scrollbar should not take space from the client width but rather automatically enlarge the control's width.
This would be very useful. If there is no such option then please implement it.
4 L A T E S T R E P L I E S (Newest First)
xequte
Posted - Oct 29 2017 : 23:53:56 Cool.
FYI, in v7.0.2, a better method will be as follows:
procedure Tfrmmain.ImageEnMView1Changed(Sender: TObject);
const
HORZ_PADDING = 8;
var
newWidth: Integer;
begin
// Widen control if scrollbar is visible
newWidth := ImageEnMView1.ThumbSizeInfo( itsOuter ).X + HORZ_PADDING;
if ImageEnMView1.CurrentScrollBars = ssVertical then
inc( newWidth, IEGlobalSettings().VScrollWidth() );
ImageEnMView1.Width := newWidth;
end;
Posted - Oct 29 2017 : 09:12:08 There is no option to do this as far as I know. I just adjust the width to be wider to so that the text is not cut off. When you do this however there is extra space until the scrollbar appears.