[Lazarus] GTK anchors

Mattias Gaertner nc-gaertnma at netcologne.de
Fri Apr 18 01:06:13 CEST 2008


On Wed, 16 Apr 2008 21:10:44 +0300
ik <idokan at gmail.com> wrote:

> Yes, that what I ment :)
> 
> Ido
> 
> On Wed, Apr 16, 2008 at 8:53 PM, Vincent Snijders
> <vsnijders at quicknet.nl> wrote:
> > Mattias Gaertner schreef:
> >
> > > On Wed, 16 Apr 2008 14:58:38 +0300
> >  > ik <idokan at gmail.com> 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




More information about the Lazarus mailing list