9 Apr 2012 10:30
Size problem when adding buttons to notebook tab labels
Ivan Perez <ivanperezdominguez <at> gmail.com>
2012-04-09 08:30:04 GMT
2012-04-09 08:30:04 GMT
Hi, I'm trying to add close buttons to notebook tab labels (similar to the ones you get in firefox). The strategy I followed is the simplest I could think of: I created an hbox with a label and a button with a "close" icon in it, and added it as the tab's label widget (for a given tab). I seem to be unable to produce the desired result: the size of the hbox is too small. This is the smallest example that I've been able to produce with similar symptoms (it uses a button instead of an hbox): import Graphics.UI.Gtk main = do initGUI win <- windowNew nb <- notebookNew lblL1 <- labelNew (Just "Some long label") lblL2 <- labelNew (Just "Some other long label") vbox <- vBoxNew False 10 boxPackStartDefaults vbox lblL1 boxPackStartDefaults vbox lblL2 notebookAppendPage nb vbox "Hiellloooo" -- Set a button as the new tab label(Continue reading)
RSS Feed