how can I set up a passive Gtk::CheckButton with just a tooltip?



Folks,

I am trying to use Gtk::CheckButton as a passive widget that just shows to the 
user if something is enabled, without letting the user activate and 
deactivate the checkbox.

I tried a lot of things, like using set_events(...) etc, without success. I 
put the CheckButton into an EventBox and masked all Events, still, the user 
can check and uncheck the checkbox with the mouse and the checkbox lights up 
as soon as the mouse moves over it or over the label.

	How can I set up a CheckButton, that is *not* greyed out, but apart from a 
tooltip is totaly passive?
(set_sensitive (false) disables tooltips).

Here is my current code with the EventBox:


EventBox* sub2_eventbox = new EventBox();
sub2_eventbox->set_events (Gdk::EventMask(0));
sub2_eventbox->set_manage();

	CheckButton* sub3_check1 = manage (new CheckButton ("<span 
size=\"small\">Roaming</span>"));
	((Label*)sub3_check1->get_child())->set_use_markup();
	sub3_check1->set_active (false);
	sub3_check1->unset_flags (CAN_FOCUS);
	sub2_eventbox->add (*sub3_check1);
	
sub1_vbox1->pack_end (*sub2_eventbox, PACK_SHRINK);


Help is very much appreciated!

thanks,
Chris


http://www.acurana.de/




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