Re: Button depressing



Hi, 

why don't you set the state with the method:

like this	set_state(Gtk::STATE_ACTIVE);

and emit this signal
	signal_state_changed ();

and if you overwrite the butten_press and leave and so on handler, you can
controll passing it to the default gtk handler...and you can avoid that the
button takes a state that isn't right...

hope that helps I had a similar problem of controlling the button states and
I figured it out with this stuff...

Regards Alex



-----Ursprüngliche Nachricht-----
Von: gtkmm-list-bounces gnome org [mailto:gtkmm-list-bounces gnome org] Im
Auftrag von Joe Van Dyk
Gesendet: Freitag, 26. Mai 2006 22:54
An: gtkmm-list gnome org; gtk-list gnome org;
ruby-gnome2-devel-en lists sourceforge net
Betreff: Button depressing

Hi,

I'm rewriting a Xlib graphical application in Gtk.  There's four
different states (run, hold, reset, shutdown)  that the application be
be in.  The state that the application is in is determined by another
application, but the user of the graphical application can request a
different "state".

Here's a picture of what the buttons for changing the state look like.
 http://img87.imageshack.us/img87/9717/buttons2mv.png  The application
is in "reset" mode currently.  Notice how the reset button is
depressed.

I'm struggling how to reproduce that look in Gtk.    I initially tried
toggle and radio buttons, but I couldn't figure out how to tell a
button to be active / toggled without generating a "toggled" event,
which would tell the application to send a request to change the
state.

Any ideas?  I'm guessing I have two solutions.  One is to figure out
how to get a normal button to look "depressed" like it does in the
picture.  The other solution is to figure out how to be able to tell a
toggle button to be toggled without that button emitting a toggled
event (which would tell the application to change state, when the user
hasn't requested a state change).

Thanks,
Joe
_______________________________________________
gtkmm-list mailing list
gtkmm-list gnome org
http://mail.gnome.org/mailman/listinfo/gtkmm-list



-- 
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.7.2/349 - Release Date: 26.05.2006




--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.7.2/349 - Release Date: 26.05.2006




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