mertero
asked on
How do I resize a TSplitter at run-time from my code?
Hi Guys.
I have two TSplitters like this, on the left side of my form. The TSplitters are the RightMost column and the row in the middle -
I-------I
I I
I-------I
I I
I I
I-------I
Doesn't matter, really. What I'd like to do is Resize them at loading time (i.e. save the last settings (Width, Height) of the controls inside).
I've saved and load the Left property of the Right TSPlitter, and the Top of the middle TSplitter, but when I assign these at MyForm.OnActivate nothing happens.
I've tried also resizing the Width of the two Panels inside the spitters but it didn't help.
What to do?
Ron.
I have two TSplitters like this, on the left side of my form. The TSplitters are the RightMost column and the row in the middle -
I-------I
I I
I-------I
I I
I I
I-------I
Doesn't matter, really. What I'd like to do is Resize them at loading time (i.e. save the last settings (Width, Height) of the controls inside).
I've saved and load the Left property of the Right TSPlitter, and the Top of the middle TSplitter, but when I assign these at MyForm.OnActivate nothing happens.
I've tried also resizing the Width of the two Panels inside the spitters but it didn't help.
What to do?
Ron.
I believe what you should do instead is, to load the last Width of the control (panel, or whatever) that is set to alLeft or alRight for your vertical splitter, and similary, for your horizontal splitter.
ASKER
DragonSlayer,
I've tried that (Like I said, it was one of the two things I tried) and still it doesn't work?
I've added more points... please help someone!
Ron.
I've tried that (Like I said, it was one of the two things I tried) and still it doesn't work?
I've added more points... please help someone!
Ron.
ASKER
Oops. forgot to increase the points...
Done!
Done!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
DS,
I found out my error (I simply pointed to the wrong panels inside). Your example helped me found this error and I give you the points...
Cheers,
R,
I found out my error (I simply pointed to the wrong panels inside). Your example helped me found this error and I give you the points...
Cheers,
R,
glad you solved it ;-)