On Saturday 13 May 2006 6:09 pm, Anna wrote: > On Sat, May 13, 2006 at 09:12:07AM +0200, hm wrote: > > How to change the look of gtk (toggle) button ? I just want to make > > button not to look like button :) I would like it to look as a label, and > > act like button in meaning, that I would like to use "clicked" signal.. > > I know, that adding new signals to old widgets is possible, but How to do > > it ? How to add signal "clicked" (for example) to a gtk label ? I`m noob, > > and i don`t actually know what Marshaller is, and so one.. if anyone > > could explain it to me, i would be grateful > > the clicked event implementation is fairly complicated. it involves > capturing mouse down events and mouse up events... making sure they > both happen within the boundaries of the widget and there appear to be > some timing requirements as well. not sure. but, you don't want to > re-create it. > > to make a button that doesn't look like a button, try using the standard > interface of the button's class hierarchy to remove the 3d effects, and > changing the color scheme so that the "pressed" state has the same color > as the not-pressed state. basically, the idea is to just remove all the > effects that make the button *look* like a physical 3d button. it's not > too difficult to do. I suspect the users requirements could be me just by putting the label in a GtkEventBox, and setting the event mask to receive a button press event. It seems pointless to use a GtkButton object and then remove anything that makes it look different to a label: in that case a precise emulation of the timing of a button clicked event would be irrelevant (the button press and release is invisible). Chris _______________________________________________ gtk-list@xxxxxxxxx http://mail.gnome.org/mailman/listinfo/gtk-list