Currently, when my button's label gets more characters, its container boxes resize horizontally, and push away the other containers next to it. I don't want this behaviour.
How do I give my boxes a fixed width, so that they don't get resized anymore when their child widgets get bigger?
Project: http://bazaar.launchpad.net/~robinj/gtkreddit/trunk/files
Add a button and select it
Go to the General tab on the right side and select "Add custom button content" (instead of the default "Configure button content" & "Label with optional image".
Add a label to the button.
Edit the details of the label (e.g "Ellipsize" = "End", "Maximum Width in Characters" = "15"). If you use glade to testdrive the application, it looks like this (the window in the middle):
For the label in Glade you can select Maximum Width in Characters in the General tab. I recommend you set that to a number such as 20 and then in your code take the first 17 characters of the text you want to display and then just append '...' so it user can see that it has been shortened. This will solve your problem.