Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2012-08

Splitter autosnap

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Keith Allpress

I am not sure if this is a feature request or bug, but when I put a splitter between two panels, the right hand side does not snap to margin when the splitter approaches the edge. (The Lazarus documentation is crazy wrong BTW.). I found that if I make the left panel left aligned, or the right panel right aligned, you get the snap behavior, but it can't be done on both sides together because one panel has to be alclient aligned. It seems crazy that a splitter cant be moved across its range. I don't know what the Delphi behavior is but if Delphi doesn't then it should. Any ideas please?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20120813/d896b757/attachment.html>

Reply by email

Mattias Gaertner
to Keith Allpress

Keith Allpress hat am 12. August 2012 um 15:26 geschrieben:

Show quoted text 5 lines
I am not sure if this is a feature request or bug, but when I put a splitter between two panels, the right hand side does not snap to margin when the splitter approaches the edge. (The Lazarus documentation is crazy wrong BTW.).

Where is the documentation wrong?

Show quoted text 7 lines
I found that if I make the left panel left aligned, or the right panel right aligned, you get the snap behavior, but it can?t be done on both sides together because one panel has to be alclient aligned. It seems crazy that a splitter cant be moved across its range. I don?t know what the Delphi behavior is but if Delphi doesn?t then it should. Any ideas please?

You can do all alLeft except the rightmost, which is alClient. This is the Delphi way.

Or you can use Align alNone and use Anchors. This is much more flexible, but a few more clicks to setup. Delphi does not have this.

See

http://wiki.lazarus.freepascal.org/Working_with_TSplitter

Here is an example what is possible with splitters and Align:

http://wiki.freepascal.org/Anchor_Docking#Layouts_that_can_be_created_with_Align

Here is an example what is possible with splitters and Anchors:

http://wiki.freepascal.org/Anchor_Docking#Layouts_that_are_impossible_with_Align_and_Panels

Mattias

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20120812/069f3e41/attachment-0001.html>

Reply by email