On Tue, 2005-10-05 at 17:37 -0300, Christian Robottom Reis wrote:
> On Tue, May 10, 2005 at 09:56:17PM +0200, Danny Milosavljevic wrote:
> > Am Dienstag, den 10.05.2005, 11:01 -0300 schrieb Christian Robottom
> > Reis:
> > > On Tue, May 10, 2005 at 07:00:58AM -0700, Brian wrote:
> > > > On Tue, 2005-10-05 at 09:49 +0200, Danny Milosavljevic wrote:
> > > > > Hi,
> > > > > 
> > > > > Am Montag, den 09.05.2005, 16:50 -0700 schrieb Brian:
> > > > > > How do you set a tooltip for the new gtk.ToolButton.   It seems 
> > > > > > that a
> > > > > > ToolButton is a subclass of a ToolItem which has a set_tip().  But 
> > > > > > how
> > > > > > do you access it from the gtk.ToolButton widget?
> > > > > 
> > > > > tooltips = gtk.Tooltips()
> > > > > [...]
> > > > > 
> > > > > toolbar = gtk.Toolbar()
> > > > > toolbar.set_tooltips(True)
> > > > > 
> > > > > toolbutton = gtk.ToolButton()
> > > > > toolbutton.set_tooltip(tooltips, "hi")
> > > > > 
> > > > > cheers,
> > > > >    Danny
> > > > > 
> > > > 
> > > > But that is what is driving me crazy over this:
> > > > 
> > > > bash-2.05b$ ./tooltip.py
> > > > Traceback (most recent call last):
> > > >   File "./tooltip.py", line 78, in ?
> > > >     tt = Tooltips()
> > > >   File "./tooltip.py", line 51, in __init__
> > > >     button1.set_tip(tooltips)
> > > > AttributeError: 'gtk.ToolButton' object has no attribute 'set_tip'
> > > 
> > > But the example above has set_tooltip, not set_tip.
> > 
> > Yes, but what I'm not getting where the imaginary tool_item_set_tip
> > comes from. 
> 
> This is the most confusing exchange ever witnessed on pygtk-list. 
> 
> Danny, you and Brian need to stop taking drugs <wink>.
> 
> Take care,
> --
> Christian Robottom Reis | http://async.com.br/~kiko/ | [+55 16] 3376 0125

The only drugs I am on are prescribed :) (cholesterol, not mind
altering :D).

What really got me confused was trying to update our program to use the
new toolbar API, (Only one tooltip is dynamic.).  Where I got into
trouble was that a gtk.Button uses gtk.Tooltips.set_tip()  while the new
inherited method is ".set_tooltip()".  The 2 names are so similar that
my brain didn't notice the difference.   The other confuser was that
both use gtk.Tooltips, but differently.  The new toolbar seems to only
use the instance for the enable/disable(), the old API seemed to store
the tooltip string in the gtk.Tooltips instance.


-- 
Brian <[EMAIL PROTECTED]>

_______________________________________________
pygtk mailing list   [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to