The only way I've found is by changing the Align properties of the splitter
and the two controls it splits to alNone and then moving the splitter (using
Top or Left property) and then resetting all the Align properties. That works
fine for the app I did it in since the app knows about all the things
involved, but I'm writing a TSplitter descendant component now, and it's not
very practical to try and figure out the other controls involved from within
the component (those routines and variables are all declared private; thanks
Borland).
Anyway, you'd think the splitter would be smart enough to handle something
like:
Top := 20;
to move itself and reposition the split controls, but that doesn't work.
Someone please tell me I'm missing something obvious here.
Regards,
Brad Stowers
Delphi Free Stuff
http://www.pobox.com/~bstowers/delphi/
Why not?
The splitter normally resides between controls aligned client and aligned to
one of the sides. If you iterate through the splitter's parent's controls, you
can find the correct control to change width or height etc, as appropriate.
Mike Orriss (m...@3kcc.co.uk)
http://www.3kcc.co.uk/notetree.htm
All the splitter does is adjust the height or width of the control that
is edge aligned the same as the TSplitter and lets the control aligned
to alClient fill in the empty space. Responding to being drug around is
the hard part.
So if you know what position you want the splitter located then you also
know how high or wide the edge aligned control should be. Using the
Parent property, search for the TControl that is adjacent to and edge
aligned like the TSplitter and set the height of that control.
Dave H.