Re: Active widgets
- From: Chris Phelps <chicane reninet com>
- To: gtk-list gnome org
- Subject: Re: Active widgets
- Date: 26 Sep 2001 14:50:37 -0700
Dont listen to either of them :-)
Any "windowed" widget (basically everything other than a GtkLabel)
has the "button_press_event" which you can register a handler for.
to connect:
gtk_signal_connect(GTK_OBJECT(progress), "button_press_event",
GTK_SIGNAL_FUNC(button_press_callback), NULL);
the callback:
gint button_press_callback(GtkWidget *widget, GdkEventButton *event,
gpointer data)
{
...handle the event...
}
Later,
Chris
On Wed, 2001-09-26 at 13:45, John Hitt wrote:
> No No No.. That makes things too complicated. You should be able
> to get those mouse-click events from placing an event_box widget
> in or around your widget of choice..
>
> See http://www.gtk.org/tutorial/ch-containerwidgets.html#SEC-EVENTBOX
>
> -john
>
> On Wed, Sep 26, 2001 at 10:10:33AM -0700, rsteinke w-link net wrote:
> > > From: Marco Lettere <lettere di unipi it>
> > >
> > > how can I obtain a widget which is able to respond to mouse-click events
> > > even if it is not a gtk button.
> > > I would like to create a progress bar which grows on a click of mouse
> > > button 1 and shrinks on a click of mouse button 2.
> > > is this possible with gtk/gdk? how?
> > > thanx,
> > > M.
> >
> > This should be possible. Basically, you need to write your own widget,
> > probably derived from the existing progress bar widget, which handles
> > button_press events.
> >
> > > ____ _____
> > > | _ \ ___ ___ _ __| ____|
> > > | | | |/ __/ _ \| '__| _|
> > > | |_| | (_| (_) | | | |___
> > > |____/ \___\___/|_| |_____|
> >
> > I think you've passed the warlord with this one.
> >
> > Ron Steinke
> >
> > _______________________________________________
> > gtk-list mailing list
> > gtk-list gnome org
> > http://mail.gnome.org/mailman/listinfo/gtk-list
>
> _______________________________________________
> gtk-list mailing list
> gtk-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtk-list
--
http://glimmer.sourceforge.net - My pet project
http://uberhackers.dhs.org - My personal website
./configure --prefix=/dev/mocha --enable-caffeine
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]