Re: Bug? in OptionMenu, when changing text of selected label



Bill McGrory wrote:
> 
> Hi All,
> 
> I'm not sure if this is a bug, or I'm not doing this correctly.
> 
> What I'm trying to do is use an option menu to select an item from a
> list. For each entry of the list, the text displayed for that entry can
> change (this is done somewhere else in the GUI). So, I need to be able
> to dynamically change the text in the labels of the menuitems in the
> option menu. All of this works well, except when I try to change the
> currently selected item. Then what happens is the option menu blanks
> out. However, if I pop up the option menu, the text of the popup
> correctly reflects the changed text, and when I pop the entry down,
> all is well.

The GtkOptionMenu uses a trick of moving the selected widget from the
menu into the button that you use to pop up the menu.

So you could try changing the widget inside the option menu button.

Damon





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