[[lazarus] GTK Z order & fixed frame]
Baeseman, Cliff
Cliff.Baeseman at greenheck.com
Fri Aug 20 13:10:45 EDT 1999
The form automatically has a fixed widget attached to it when you add a
control to the form. The fixed widget is applied to the form and the
controls is placed on by x y position and then it is sized.
When a form is streched the form tells the children to reset the position
and size on the parents fixed widget.
This is a very good approach. Myself and shane fought a ugly battle with
control positioning before arriving at the current solution.
Cliff
-----Original Message-----
From: Michal Bukovjan [mailto:mbukovjan at netscape.net]
Sent: Friday, August 20, 1999 1:03 PM
To: lazarus at miraclec.com
Subject: Re: [[lazarus] GTK Z order & fixed frame]
"Samuel Liddicott" <sam at campbellsci.co.uk> wrote:
> I've been reading the GTK doco's and it doesn't look to good.
>
> I can't find much refernce on setting Z order and (worse still) its mostly
> based around auto-scaling controls. Ugh - stretchy buttons! My tastes
are
> if the button is big enough for the text, why make it bigger just because
> the user grew the form!
>
> Anway, it looks to me like we will need to host most controls in a gtk
> fixed-frame which is about the only thing that allows absolute x-y
> positioning. Is this right? If so I imagine thats what we do now? Do
we?
Hmm, I am not sure at this point, but as I studied the GTK, I think there is
some gtk_??widget??_??set??_??window??_??policy?? (I really do not remember
now), in which you pass four arguments for scaling, in a range 0-1, where 1
means resize totally in that direction upon parent resize, 0 means do not
resize. (you can pass float values in between). So, I think if you set that
up
to 0,0,0,0, you get non-resizable control.
>
> Next problem is that in windows, each "window" is er... a normal window
and
> can actually have child controls.
> A button or a list box can have child controls (I've done this in some
> applications...).
>
> Can GTK list boxes have child controls?
Yes. In fact, the GtkList is only a container containing GktItems (provide
white background behind the text), which in turn may contain a GtkLabel,
which
is then what you see. But theoretically, the list may contain anything,
pictures, buttons, any other container containing yet another controls,
anything you like.
>
> Do we get to intercept the painting for child controls? In delphi I do
this
> quite a bit - not least for OwnerDraw buttons and OwnerDraw list boxes?
>
Now this is what I am interested now. I am not sure though, maybe Shane, who
does this Canvas stuff, will listen. Do you, Shane?
Is it possible to get/make use/map arbitrary widget's GdkCanvas to a
Delphi-like TCanvas, or better yet, to an arbitrary control ? (i.e. I don't
want a control that creates its Canvas, but rather have a dummy control (say
TGraphicControl descendant) and assign an existing GdkCanvas (of some
existing
GtkWidget) to it on the fly ?
This OwnerDraw stuff as I see it now is the most likely candidate to be
incompatible with WinDelphi.
> Sorry for so many questions, I'm trying to get up to speed on where we are
> at the moment.
>
> Sam
>
> _________________________________________________________________
> To unsubscribe: mail lazarus-request at miraclec.com with
> "unsubscribe" as the Subject
> archives at http://www.miraclec.com/list_archives/lazarus
____________________________________________________________________
Get your own FREE, personal Netscape WebMail account today at
http://webmail.netscape.com.
_________________________________________________________________
To unsubscribe: mail lazarus-request at miraclec.com with
"unsubscribe" as the Subject
archives at http://www.miraclec.com/list_archives/lazarus
More information about the Lazarus
mailing list