Re: How to change the text on a menu?



J. Davison de St. Germain wrote:
Hi,

  Can someone please tell me how to change the text on a menu?
For example, if I created the menu with "Turn On Light" and
someone selects it, I wish to change the text to "Turn Off Light".
I would have expected to call gtk_menu_item_set_label() or some
such, but I can't find such a function.


I believe GtkMenuItem is a container...

You need to remove the old child using gtk_container_remove and then add the new label using gtk_container_add.




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