Setting option menus



Hello.  I am working on an application which calculates various delays
using 555 timers.  My basic gui setup is like this:

	Capacitor Value [value] [opt-menu]
	Resistor Value  [value] [opt-menu]

where value is a text entry field and opt-menu is an option menu.  I
have a Clear button on my form which blanks out the text entry fields,
and is also supposed to reset the opt-menu menus to display a certain
text, for instance, if my option menu consists of:

	Ohms
	kOhms
	mOhms

the user currently has kOhms or mOhms selected, I want to reset the
option menu to display Ohms.  I have been looking through the GTK+
tutorial at www.gtk.org and have also been looking through "Developing
Linux Applications" on how to do this, but to no avail.  I found a
gtk_menu_set_active() function, is that the way to go?  I tried it, it
seemed to possibly set the correct menu item, but won't change the
widget to reflect the correct one.  Am I on the right track?

Thanks in advance,
CP Knerr
-- 
----------------------------------------------------------------------------
                   Windows free since Linux 2.0.27
----------------------------------------------------------------------------
CP Knerr                          |  Undergraduate Computer Science
url: http://www.rit.edu/~cpk8576  |  Networking and Distributed Systems
email: cpk8576@cs.rit.edu         |  Rochester Institute of Technology
----------------------------------------------------------------------------



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