RE: GUI construction tips

Yes, I'm using Glade.... and I knew there was a better way to do
this :) Thanks a lot.So i'll try to set padding for my labels.One
more thing: what about if my problem now is with vertical
alignment? labels are so close to the top border of the

Avoid using hacks like lables with spaces...  They're horrid, and there are a number of different container 
widgets that you can use to adjust spacing around your widgets (though I have sometimes used things like an 
EM-space on labels).

Gtk?Box has two seperate padding points.  When you create the box, you can specify the padding to put between 
each and every widget, but that will be only in the direction of the box.  With individual widgets, you can 
specify the padding to put between them and the box cell they occupy, but that's in addition to the 
intra-cell padding.

This is where things like GtkAlignment come into play.  You place your widget inside an Alignment, and the 
Alignment goes into the Box.  Or, if you use the intra-cell padding when you create the box, then padd the 
entire box within an Alignment.  I think Glade even has some options in its menu to quickly throw an 
alignment around a widget, because they're used so often.

Don't be afraid to use containers...  That's what they're there for.  And you can do just about anything 
you'd sanely need to do, between the two boxes, tables, and alignments.  Then, if you really get stuck, there 
are Layout and Fixed containers, and alignment group things which I haven't used because Glade doesn't neatly 
support them yet, but apparently they'll allow you to align widgets which are at different levels in the 
container heirachy.


Join Excite! -
The most personalized portal on the Web!

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