Link to home
Start Free TrialLog in
Avatar of mertero
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.
Avatar of DragonSlayer
DragonSlayer
Flag of Malaysia image

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.
Avatar of mertero
mertero

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.
Avatar of mertero

ASKER

Oops. forgot to increase the points...

Done!
ASKER CERTIFIED SOLUTION
Avatar of DragonSlayer
DragonSlayer
Flag of Malaysia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mertero

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,
glad you solved it ;-)