Delphi: splitter only changes 2 panels it splits

I have 4 panels in a row, with 3 splitters in between. 1st / 2nd / 3rd bar: align=alLeft

, 4th bar: align=alClient

.

[1] | [2] | [3] | [4]

The user now wants to

  • splitter 1 only resizes panels 1 and 2 (don't touch others, it now moves panels 3/4).
  • splitter 2 only resizes panels 2 and 3 (don't touch others, it now moves panel 4)

How to do this, what events to handle (of TSplitter.OnMoved

course) and how to handle them? Maybe not install Align

like now?

+3


source to share


1 answer


Assuming Splitter 3 (the last one) will only change panel 3 and 4, this can be done with a little nesting:



  • The top level has PanelA (alLeft), Splitter3 (alLeft), Panel4 (alClient).
  • PanelA contains PanelB (alLeft), Splitter2 (alLeft), Panel3 (alClient).
  • PanelB contains Panel1 (alLeft), Splitter1 (alLeft), Panel2 (alClient).
+7


source







All Articles