# Tooltip for a drawable object?

**URL:** <https://www.ruby-forum.com/t/tooltip-for-a-drawable-object/182930>\
**Category:** Ruby-Gnome 2\
**Created:** [February 4, 2010, 10:27pm UTC](https://www.ruby-forum.com/t/tooltip-for-a-drawable-object/182930 "2010-02-04T22:27:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ruby\_coder99](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/8c91f0/32.png) [@ruby\_coder99](https://www.ruby-forum.com/u/ruby_coder99)\
**Post date:** [February 4, 2010, 10:27pm UTC](https://www.ruby-forum.com/t/tooltip-for-a-drawable-object/182930/1 "2010-02-04T22:27:38Z")

</div>

Im creating a series of boxes via draw\_rectangle and wanted to attach a  
tooltip to any given box, is there a way to do this? Example of my  
draw\_rectangle code:

```
x = boxlocations[axis_y_value][axis_x_value].x
y = boxlocations[axis_y_value][axis_x_value].y
w = boxlocations[axis_y_value][axis_x_value].width
h = boxlocations[axis_y_value][axis_x_value].height

gc = Gdk::GC.new(Gdk::Pixmap.new(area.window,w,h,-1))
gc.fill = Gdk::GC::Fill::SOLID
gc.rgb_fg_color = Gdk::Color.parse(color)

a = area.window.draw_rectangle(gc, true, x, y, w, h)
```
