Re: [pygtk] Getting tooltips color

2005-11-13 Thread Andrew Conkling
On 11/11/05, Nikos Kouremenos [EMAIL PROTECTED] wrote:
 win = gtk.Window()
 win.set_name('gtk-tooltips') # this draws it as tooltip
 then you get the style and whatever color u like

Many thanks; this does indeed work.  However, it seems to be missing
the border (black for me).  I don't think there should be any more
finagling necessary  Any ideas?
___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/


Re: [pygtk] Getting tooltips color

2005-11-13 Thread Andrew Conkling
On 11/13/05, Gian Mario Tagliaretti [EMAIL PROTECTED] wrote:
 def _on_expose_event(self, widget, event):
 w, h = widget.size_request()
 widget.style.paint_flat_box(widget.window,
 gtk.STATE_NORMAL, gtk.SHADOW_IN,
 None, widget, tooltip,
 0, 0, w, h)
 return False

That doesn't seem to do anything for me.

--
http://aconkling.blogspot.com
___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/


Re: [pygtk] Getting tooltips color

2005-11-13 Thread Gian Mario Tagliaretti
2005/11/13, Andrew Conkling [EMAIL PROTECTED]:

 That doesn't seem to do anything for me.

make sure that the argument (detailed description) is tooltip (and
not gtk-tooltips or tooltips) and you will have the border around the
window.

cheers
--
Gian Mario Tagliaretti
PyGTK GUI programming
http://www.parafernalia.org/pygtk/
___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/


Re: [pygtk] Getting tooltips color

2005-11-11 Thread Steve McClure
On Thu, 2005-11-10 at 23:54 -0500, Andrew Conkling wrote:
 I was wondering if it were possible to get the GTK+ theme's color for
 tooltips.  gtk.Tooltips() does not have a .get_style() since it's not
 a subclass of gtk.Widget(), so it seems some voodoo magic would be
 necessary to get the color.
 
 Also, a related question for my purposes: is it possible to set a
 border around a gtk.Window()?  If so, I'll need to figure out the
 color of the tooltips' border also. :)

I used an eventbox inside the window and set the windows border_width to
1.  Then when the window is realized:
s = win.get_style().copy()
s.bg[gtk.STATE_NORMAL] = s.black
win.set_style(s)

I used an eventbox so I could catch keypresses and mouse clicks to
dismiss the window along with leave_notify on the window itself.

As for the tooltip style, no clue, I just hardcoded the color from the
regular tooltips.  I'm sure it will be wrong when the theme changes
but...

 
 Thanks,
 Andrew
 
 --
 http://aconkling.blogspot.com
 ___
 pygtk mailing list   pygtk@daa.com.au
 http://www.daa.com.au/mailman/listinfo/pygtk
 Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
-- 
Steve McClure   Racemi
email: [EMAIL PROTECTED]  380 Interstate North 
Pkwy, SE
voice: 404-892-5850 Suite 250
fax: 404-892-7215   Atlanta, GA 30339
http://www.racemi.com

___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/


Re: [pygtk] Getting tooltips color

2005-11-11 Thread Andrew Conkling
On 11/11/05, Brian [EMAIL PROTECTED] wrote:
 On Thu, 2005-10-11 at 23:54 -0500, Andrew Conkling wrote:
  I was wondering if it were possible to get the GTK+ theme's color for
  tooltips.  gtk.Tooltips() does not have a .get_style() since it's not
  a subclass of gtk.Widget(), so it seems some voodoo magic would be
  necessary to get the color.
 
  Also, a related question for my purposes: is it possible to set a
  border around a gtk.Window()?  If so, I'll need to figure out the
  color of the tooltips' border also. :)

 I believe that came up just a few weeks ago and had replies with
 solutions.  Although it may have been on the gtk-app-devel mail list.

 Check the archives and you should find your solution.

I'll keep taking a look, but I didn't see anything about tooltips on
either list

--
http://aconkling.blogspot.com
___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/


Re: [pygtk] Getting tooltips color

2005-11-11 Thread Nikos Kouremenos
win = gtk.Window()
win.set_name('gtk-tooltips') # this draws it as tooltip
then you get the style and whatever color u like

On 11/11/05, Andrew Conkling [EMAIL PROTECTED] wrote:
 On 11/11/05, Brian [EMAIL PROTECTED] wrote:
  On Thu, 2005-10-11 at 23:54 -0500, Andrew Conkling wrote:
   I was wondering if it were possible to get the GTK+ theme's color for
   tooltips.  gtk.Tooltips() does not have a .get_style() since it's not
   a subclass of gtk.Widget(), so it seems some voodoo magic would be
   necessary to get the color.
  
   Also, a related question for my purposes: is it possible to set a
   border around a gtk.Window()?  If so, I'll need to figure out the
   color of the tooltips' border also. :)
 
  I believe that came up just a few weeks ago and had replies with
  solutions.  Although it may have been on the gtk-app-devel mail list.
 
  Check the archives and you should find your solution.

 I'll keep taking a look, but I didn't see anything about tooltips on
 either list

 --
 http://aconkling.blogspot.com

 ___
 pygtk mailing list   pygtk@daa.com.au
 http://www.daa.com.au/mailman/listinfo/pygtk
 Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/





--
Nikos Kouremenos | Jabber ID: [EMAIL PROTECTED] | http://members.hellug.gr/nkour
___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/


[pygtk] Getting tooltips color

2005-11-10 Thread Andrew Conkling
I was wondering if it were possible to get the GTK+ theme's color for
tooltips.  gtk.Tooltips() does not have a .get_style() since it's not
a subclass of gtk.Widget(), so it seems some voodoo magic would be
necessary to get the color.

Also, a related question for my purposes: is it possible to set a
border around a gtk.Window()?  If so, I'll need to figure out the
color of the tooltips' border also. :)

Thanks,
Andrew

--
http://aconkling.blogspot.com
___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/


Re: [pygtk] Getting tooltips color

2005-11-10 Thread Brian
On Thu, 2005-10-11 at 23:54 -0500, Andrew Conkling wrote:
 I was wondering if it were possible to get the GTK+ theme's color for
 tooltips.  gtk.Tooltips() does not have a .get_style() since it's not
 a subclass of gtk.Widget(), so it seems some voodoo magic would be
 necessary to get the color.
 
 Also, a related question for my purposes: is it possible to set a
 border around a gtk.Window()?  If so, I'll need to figure out the
 color of the tooltips' border also. :)
 
 Thanks,
 Andrew

I believe that came up just a few weeks ago and had replies with
solutions.  Although it may have been on the gtk-app-devel mail list.

Check the archives and you should find your solution. 

-- 
Brian [EMAIL PROTECTED]

___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/