[Lazarus] TPairSplitter, Callback when splitter moved
Mattias Gaertner
nc-gaertnma at netcologne.de
Sat Aug 24 22:58:25 CEST 2013
On Fri, 23 Aug 2013 13:50:16 +0200
Jürgen Hestermann <juergen.hestermann at gmx.de> wrote:
> Yet another TPairSplitter question:
>
> I can ensure that the ratio between upper and lower panel is a certain ratio by adding an OnResize method like this:
>
> PairSplitter1.Position := Round(PairSplitter1.Height*SplitterRatio);
>
> with SplitterRatio beeing something between 0 and 1 (I used 0.5 to make both (nearly) the same size).
>
> But if the user now changes the ratio manually I need to update SplitterRatio.
> What event is driven when the splitter is moved manually so that I can recalculate SplitterRatio?
When the splitter is moved the size of the first side is changed. So,
you could use Sides[0].OnResize.
Mattias
More information about the Lazarus
mailing list