Re: Widget order in GtkFixed



Alex Pavloff wrote:

The widgets do indeed overlap.  If GtkFixed lets me specify positions, well,
dang it, I'm going to overlap them!    Actually, the way it works is that I
have a simple GUI builder (for Windows) which creates simple text files
which are then downloaded an embedded Linux machine.  The text file
describes a screen with buttons here, rectangles there, etc etc, and well,
the end users will overlap things.

Hey, me too!; only we use glade under linux to generate
the xml and write our gtkrc's by hand. (only our objects
dont "drag" and cant be moved.)

If this really works; (to my great surprise) I would look
at gtkfixed.c and check out the "expose" event handlers.

gtk_container_add(GTK_CONTAINER(fixed), widget);

or consequently gtk_fixed_put(...)

will add the new widget to a GList * and then
refer to this GList * to draw the children
in the expose event handler.

It makes sense sometimes too -- people like to put buttons and text on top
of images.

Hmm; usually in gtk we call that "inside" as opposed to "on top"

You can have a button with a child label; but a label on top
of a button is another story.


Good luck!,
        -Tristan

For the most part, it works too.  The order which I put things into the
GtkFixed controls sometimes order the overlap objects will be displayed in.
GtkButtons, GtkLabels and GtkImages all seem to behave as one would expect
like this, and when you overlapped buttons it looks right.

However, GtkEntry, GtkFixed, and GtkProgressBar don't work properly and
don't work according to any logic that I can see.  Any thoughts on how to
beat them into shape so they show up in the right order or any clues as to
what order they're putting themselves into?

Alex Pavloff - apavloff eason com
Eason Technology -- www.eason.com

PS:  The Gnome API reference doesn't look right with Opera (but it does with
IE).  <insert conspiracy theory>

-----Original Message-----
From: Tristan Van Berkom [mailto:vantr touchtunes com]
Sent: Tuesday, March 04, 2003 6:59 AM
To: Alex Pavloff
Cc: 'gtk-app-devel-list gnome org'
Subject: Re: Widget order in GtkFixed



      Interestng; do the widgets overlap at all ?
is it buggy ? do the bouding boxes make sense (when
you click an overlapped button where two buttons
meet; do they both get "clicked" ?)

AFAIK; only GtkWindow's can overlap other widgets.

Cheers,
      -Tristan


Alex Pavloff wrote:

What controls what order widgets will be displayed in a GtkFixed?

I'm trying to overlap some widgets and what makes sense to
me (putting the
widgets into GtkFixed in the order that they're supposed to
be drawn)
doesn't seem to have that effect.

Alex Pavloff - apavloff eason com
Eason Technology -- www.eason.com

_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]