[Lazarus] Splitter in action
Malcolm Poole
malcolm at lingua-z.co.uk
Wed Jan 28 12:56:39 CET 2009
Hans-Peter Diettrich wrote:
> I want to resize a control by using an splitter. As a test case, have a
> form with Button1 and Splitter1. In the FormCreate event I set
> Splitter1.AnchorSplitter(akLeft, Button1);
>
> Now the splitter is anchored to the right of the button, and a sizing
> cursor appears when the splitter is dragged. But the button is not
> affected at all. What's missing?
>
The splitter resizes by moving the boundary between two controls, so you
would have two buttons on a panel, for example, with the splitter
between them. One of the buttons would have its Alignment set to (for
example) alLeft, the other button set to alClient. When you move the
splitter the button on one side becomes wider and the button on the
other becomes narrower.
Let us know what control you want to be able to sesize and its
relationshp to other controls and we can probably suggest a way of doing it
> BTW, the splitter's ResizeStyle seems to have no effect?
>
Been like that for a while as far as I'm aware, but it may be feature
tied to a particular OS or widgetset.
Malcolm
More information about the Lazarus
mailing list