Sign in Join

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

Mailing lists / lazarus / 2008-04

GTK anchors

5 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

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

ik

Hello,

On GTK(+) there is a support for control layout that can mirror and expand forms and components depending on their content and direction.

Theoretically, it can not be done in Lazarus, because it is based on left, top, width and height, however, I'm looking for a way to add additional properties that could add such support (for any widget that support it).

Any idea how can I achieve such a thing ?

Thanks,
Ido

Reply by email

Mattias Gaertner
to ik
Show quoted text 11 lines
Hello, On GTK(+) there is a support for control layout that can mirror and expand forms and components depending on their content and direction. Theoretically, it can not be done in Lazarus, because it is based on left, top, width and height, however, I'm looking for a way to add additional properties that could add such support (for any widget that support it). Any idea how can I achieve such a thing ?

Either you don't know the LCL anchors or you don't like them.

Do you know
http://wiki.lazarus.freepascal.org/Autosize_/_Layout http://wiki.lazarus.freepascal.org/Anchor_Sides
http://wiki.lazarus.freepascal.org/LCL_AutoSizing
?

Mattias

Reply by email

Vincent Snijders
to Mattias Gaertner
Mattias Gaertner wrote 22 lines
On Wed, 16 Apr 2008 14:58:38 +0300 ik wrote: > Hello, > > On GTK(+) there is a support for control layout that can mirror and > expand forms and components depending on their content and direction. > > Theoretically, it can not be done in Lazarus, because it is based on > left, top, width and height, however, I'm looking for a way to add > additional properties that could add such support (for any widget that > support it). > > Any idea how can I achieve such a thing ? Either you don't know the LCL anchors or you don't like them. Do you know http://wiki.lazarus.freepascal.org/Autosize_/_Layout http://wiki.lazarus.freepascal.org/Anchor_Sides http://wiki.lazarus.freepascal.org/LCL_AutoSizing ?

What is probably meant:

Assume the following layout:
--------- ------------------
| Label1| | Edit1 |
--------- ------------------

Now change the BidiMode property of both controls (or maybe the form) to bdRightToLeft.

Then the layout should change too:
------------------ ---------
| Edit1 | | Label1|
------------------ ---------

(at least it is mirroring)

Vincent

Reply by email

ik
to Vincent Snijders

Yes, that what I ment :)

Ido

Vincent Snijders wrote 50 lines
Mattias Gaertner schreef: > On Wed, 16 Apr 2008 14:58:38 +0300 > ik wrote: > >> Hello, >> >> On GTK(+) there is a support for control layout that can mirror and >> expand forms and components depending on their content and direction. >> >> Theoretically, it can not be done in Lazarus, because it is based on >> left, top, width and height, however, I'm looking for a way to add >> additional properties that could add such support (for any widget that >> support it). >> >> Any idea how can I achieve such a thing ? > > Either you don't know the LCL anchors or you don't like them. > > Do you know > http://wiki.lazarus.freepascal.org/Autosize_/_Layout > http://wiki.lazarus.freepascal.org/Anchor_Sides > http://wiki.lazarus.freepascal.org/LCL_AutoSizing > ? What is probably meant: Assume the following layout: --------- ------------------ | Label1| | Edit1 | --------- ------------------ Now change the BidiMode property of both controls (or maybe the form) to bdRightToLeft. Then the layout should change too: ------------------ --------- | Edit1 | | Label1| ------------------ --------- (at least it is mirroring) Vincent _______________________________________________ Lazarus mailing list http://www.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply by email

Mattias Gaertner
to ik
Show quoted text 48 lines
Yes, that what I ment :) Ido On Wed, Apr 16, 2008 at 8:53 PM, Vincent Snijders wrote: > Mattias Gaertner schreef: > > > On Wed, 16 Apr 2008 14:58:38 +0300 > > ik wrote: > > > >> Hello, > >> > >> On GTK(+) there is a support for control layout that can mirror > >> and expand forms and components depending on their content and > >> direction. > >> > >> Theoretically, it can not be done in Lazarus, because it is > >> based on left, top, width and height, however, I'm looking for > >> a way to add additional properties that could add such support > >> (for any widget that support it). > >> > >> Any idea how can I achieve such a thing ? > > > > Either you don't know the LCL anchors or you don't like them. > > > > Do you know > > http://wiki.lazarus.freepascal.org/Autosize_/_Layout > > http://wiki.lazarus.freepascal.org/Anchor_Sides > > http://wiki.lazarus.freepascal.org/LCL_AutoSizing > > ? > > What is probably meant: > > Assume the following layout: > --------- ------------------ > | Label1| | Edit1 | > --------- ------------------ > > Now change the BidiMode property of both controls (or maybe the > form) to bdRightToLeft. > > Then the layout should change too: > ------------------ --------- > | Edit1 | | Label1| > ------------------ --------- > > (at least it is mirroring)

Well, I could implement cclRightToLeftThenTopToBottom and cclBidiThenTopToBottom.
The latter could then choose automatically between cclLeftToRightThenTopToBottom and cclRightToLeftThenTopToBottom.

Mattias

Reply by email