1. EuGTK - GtkImageMenuItem - Is it checked?
- Posted by Jerry_Story Sep 01, 2010
- 1124 views
In EuGTK, how do you test whether a GtkImageMenuItem has a check mark beside it?
In wxEuphoria, it is done like this:
is_menuitem_checked( a_menu_item)
Perhaps adding some code to 'test40.ex' in the EuGTK demos would suffice.
Thanks.
2. Re: EuGTK - GtkImageMenuItem - Is it checked?
- Posted by Jerry_Story Sep 03, 2010
- 969 views
In EuGTK, how do you test whether a GtkImageMenuItem has a check mark beside it?
In wxEuphoria, it is done like this:
is_menuitem_checked( a_menu_item)
Perhaps adding some code to 'test40.ex' in the EuGTK demos would suffice.
Thanks.
Is this correct?
get(menu_item,"get_active",1)
It doesn't produce an error so I'm going to go with it for now.
3. Re: EuGTK - GtkImageMenuItem - Is it checked?
- Posted by irv Sep 05, 2010
- 903 views
item_x = create(GtkCheckMenuItem,"with_mnemonic=>_About") --- -- alternate: create(GtkCheckMenuItem,"with_label=>My Label Text") --- if get(item_x,"active") then ....
However, I left out GtkCheckMenuItem from the wrapper: you can easily add the following anywhere in the control method declarations section of GtkRoutines.e
control[GtkCheckMenuItem] = {"gtk_check_menu_item",GtkMenuItem, {"new_with_mnemonic",{S},P}, {"new_with_label",{S},P}, {"new",{},P}, {"get_active",{P},B}, {"set_active",{P,B}}, {"toggled",{P}}, {"get_inconsistent",{P},B}, {"set_inconsistent",{P,B}}, {"set_draw_as_radio",{P,B}}, {"get_draw_as_radio",{P},B} }
4. Re: EuGTK - GtkImageMenuItem - Is it checked?
- Posted by Jerry_Story Sep 06, 2010
- 858 views
item_x = create(GtkCheckMenuItem,"with_mnemonic=>_About") --- -- alternate: create(GtkCheckMenuItem,"with_label=>My Label Text") --- if get(item_x,"active") then ....
However, I left out GtkCheckMenuItem from the wrapper: you can easily add the following anywhere in the control method declarations section of GtkRoutines.e
control[GtkCheckMenuItem] = {"gtk_check_menu_item",GtkMenuItem, {"new_with_mnemonic",{S},P}, {"new_with_label",{S},P}, {"new",{},P}, {"get_active",{P},B}, {"set_active",{P,B}}, {"toggled",{P}}, {"get_inconsistent",{P},B}, {"set_inconsistent",{P,B}}, {"set_draw_as_radio",{P,B}}, {"get_draw_as_radio",{P},B} }
Thanks.