[pygtk] ProgressBar widget click event

Noah Schwartz noah.schwartz1 at gmail.com
Wed Nov 8 00:01:52 WST 2006


On Tuesday 07 November 2006 06:55, Alessandro Pellizzari wrote:
> Il giorno lun, 06/11/2006 alle 19.00 -0500, Noah Schwartz ha scritto:
> > I don't seem to be able to capture the click event for ProgressBar. I
> > tried connecting the button-press-event to a function but, it wasn't
> > getting called. Then I set it up to capture all events and still I wasn't
> > capturing clicks.
>
> Maybe I am wrong, but the progressbar doesn't support clicking events.
> You can create a button (which is a container) and associate a progress
> bar as child. This way, when you press the progress bar, you really
> press the button, that emits the clicked signal.
> You can give no border to the button, making it invisible.
>
> Bye.

If you think this will work, I will definitely give this a shot.

I had thought of this and I had expected it not to work given that I am using 
a ProgressBar as the tab for a notebook page. The click on the bar area 
wasn't activating the page while clicking on a label would. Neither of those 
support clicking, I think. This led me to assume there was a problem with 
ProgressBar.

Noah


More information about the pygtk mailing list