Re: Some questions



Julio Cesar Gazquez <shulai ciudad com ar> writes: 
> 1) Hitting TAB once and again, focus goes from a widget to another, until 
> suddenly dissapears (after last widget, I guess), hitting TAB again focus 
> appears in the first widget. Why? Where is the damn focus?

It's a bug. It may be fixed in GTK 1.2.9, but it might break some
applications to fix it, so it may not be fixed until 2.0 if testing
shows that fixing it breaks some apps.

> 2) There is a way to justify widgets into its container cell? I wish
> to set my labels to right in the first column of a table, while its
> matching entries are justified to the left in the second column of
> that table. I didn't find any function to do that along the
> hierarchy.

As others have said, GtkMisc subclasses have a builtin set_alignment()
feature, non-GtkMisc widgets can be packed into a GtkAlignment which
allows them to be aligned.

> 3) Eventually, I'll need a more flexible layout, a "raw" layout that don't 
> care about wigets positions, as positions are set up by hand (i.e. 
> coordinates). I don't worry too much about resizing, but application needs 
> makes deal with container-into-container strategies and such impossible.
> There is some container class I can use? 
> 

GtkFixed, as people said.

Remember that fixed coordinates break the following things, where
"break" means truncated text, overlapping widgets, and other redraw
bugs:

 - themes
 - fonts other than the one you used to write the app
 - because of the font thing, use of the app on platforms other 
   than yours such as Windows or framebuffer
 - internationalization, because this leads to different text sizes

In addition, the fixed widget can't properly be mirrored in
right-to-left languages such as Hebrew and Arabic. i.e. normally GTK
will flip the interface to put labels on the right of the thing they
label, it can't do that with GtkFixed.

Finally, fixed positioning makes it kind of annoying to add/remove GUI
elements, since you have to reposition all the others.

This breakage is OK if you know your app will be used only with
operating system configurations you have control over, of course. But
you should be aware of the tradeoffs.

Havoc

   




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