Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

In Quickly/Glade, is it possible to keep the text (well, labels) centered, so when I maximize my program's window, the text stays centered? It's probably something easy to do, but I have been unable to find where to auto-adjust the position. Any help would be greatly appreciated.

share|improve this question
    
I would suggest you to ask this at stackoverflow.com instead. –  Andrejs Cainikovs Jun 28 '12 at 21:43

1 Answer 1

up vote 1 down vote accepted

Generally this is caused by how you are creating your layout. It sounds like you are using a fixed layout (as your top-level layout) which will make it much more difficult to do.

The best thing to do is to create a fluid layout by starting your layout with a GtkBox within your GtkWindow. Much like this:

window -> box -> label

This will make your layout fluid and allow for your text to become centered within your window. If you have to remain with a fixed layout, you'll have to attempt to center the label problematically.

If you are using a GridLayout, I believe you'll need to turn on "Horizontal Expand" on the label to get it to fill the unused cell space. However, its been awhile, so don't hold me to that.

share|improve this answer
    
You are correct, and that does work nicely :D. –  Compt Jun 30 '12 at 2:18

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.