Re: Event not passing to Notebook when Label has Eventbox



On Thu, Apr 12, 2001 at 12:38:48PM +0100, John Cupitt wrote : 
> Markus Fischer wrote:
> >         I've a Notebook widget which dynamically allocates Pages.
> > Around the Page's Labels I build a GtkEventBox to catch
> > right-click mouse button. Unfortunatly I can't change to that
> > register anymore because the event is not passed through to the
> > Notebook widget.  How can I make the event pass through under
> > certain circumstances (e.g. left mouse button pressed) and not
> > pass through on e.g. right mouse click ?
> 
> I do this as well so I can replace the right-button-popup-menu, and get
> tooltips on a tab. I don't think you can easily pass the event on, since
> notebook uses a single eventbox for all the tabs.
> 
> I get around it by spotting left clicks myself in the event callback on
> the tab, and then calling gtk_notebook_set_page() explicitly. As usual,
> I guess there's probably a better way :-)

	Yes, thats how I did after thinking and thinking. I used
set_data to bind the current pagenum to the event and if the
event == left mouse button I just manually call page_num.

	But, when using this GtkEventBox, there a light gray
border around the Label at the Notebook ? Can I remove this ?
I've set up a screenshot to show what I mean [1].

thanks,
	Markus

[1] http://josefine.ben.tuwien.ac.at/~mfischer/test/gtk_notebooklabel_w_gtkeventbox.png

-- 
Markus Fischer,  http://josefine.ben.tuwien.ac.at/~mfischer/
EMail:         mfischer josefine ben tuwien ac at
PGP Public  Key: http://josefine.ben.tuwien.ac.at/~mfischer/C2272BD0.asc
PGP Fingerprint: D3B0 DD4F E12B F911 3CE1  C2B5 D674 B445 C227 2BD0




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