Hi. I use .set_sensitive on a button. That button then becomes: - non functional (you can't click on it) - greyed out in case it has an image I am fine with the non-functional part of the button. I don't want it to respond on anymore click events. But, that greyed out part is a problem. The colourful image it has suddenly is greyish, and that looks ugly. Is there a way to disable the click functionality of a button otherwise? Something like ... button.disable_event(:click) Or something similar?
on 2011-09-11 19:42
on 2011-09-11 19:56
On Sun, Sep 11, 2011 at 19:42, Marc Heiler <email@example.com> wrote: > suddenly is greyish, and that looks ugly. You’re in Gtk+ territory again. Please realize that Ruby-GNOME2 is simply a wrapper around various “GNOME” libraries. All Ruby-GNOME2 does, more or less, is provide data conversion between Ruby types and C/GLib/Gtk+ types.
on 2011-09-13 06:08
on 2011-09-13 06:54
On Tue, 2011-09-13 at 06:08 +0200, Marc Heiler wrote: > My current solution is to show the buttons there, but without making > them CLICKABLE. > > So all I really need is the answer to the question how to disable a > button to be clickable. Perhaps one approach would be to not use Gtk buttons at all. You could simply use a Gtk::Image. You would need to wrap the image in a Gtk::EventBox in order to get mouse click events - the documentation for Gt;::Image has an example. Regards Grant
on 2011-09-13 13:48
On Tue, Sep 13, 2011 at 06:08, Marc Heiler <firstname.lastname@example.org> wrote: > That is nice but your statement has not helped much. :( Nice? How? > My goal is to stay within the Ruby world when I try to solve a problem > in the ruby-gtk / ruby-gnome world. My point was that your goals may not be in alignment with the goals of this list. > So all I really need is the answer to the question how to disable a > button to be clickable. Again, this list isn’t primarily about answering questions pertaining to doing things in Gtk+, through Ruby-GNOME2 libraries or otherwise. I’m not stopping you from asking or anyone answering, but please realize that there are lists that are better suited for these questions, for example, http://mail.gnome.org/mailman/listinfo/gtk-list. The Ruby-GNOME2 project is extremely strapped for development resources and I’m sure you wouldn’t want to use up our limited time when another mailing list may have more resources to spare. That said, your bug reports are much appreciated and it’s great to see people using Ruby-GNOME2. I also see that Grant has provided a possible solution. I hope that it works for you!