From: Max <max...@ca...> - 2013-01-28 23:45:50
|
Hello. I've recently started to play with gtk2hs and I'd like to get $subj for my gtk.notebook based app: small icon and a text right next to it. Unfortunately there's no ready-made interface available for that so I'm trying to use notebookAppendPageMenu which allows to specify widgets for tab and menu. Here is what I do: hbox <- hBoxNew False 2 img <- imageNewFromFile ("icon.png") label <- labelNew (Just "AwesomeTab") boxPackStart hbox img PackNatural 1 boxPackStart hbox label PackGrow 0 notebookAppendPageMenu notebook socket hbox hbox It compiles just fine but when I run app I got Gtk-WARNING **: Can't set a parent on widget which has a parent What am I doing wrong and how do I do it right? I've tried to read through manuals and lurk for code samples but got nothing relevant so far :( cheers, Max. |