[fxruby-users] triggering tooltip manually

Andreas S andreas_s at hotmail.com
Tue Jan 20 15:08:01 EST 2009

I have a table that is in "Show changes" mode and I would like to use tooltip to show the original value of a cell.

Table's SEL_QUERY_TIP is not triggered anymore once something is selected. So I'm thinking to use SEL_SELECTED to capture the event and trigger tooltip manually. However, I haven't been quite successful triggering it.

(with added access to tooltip)

mytable.connect SEL_SELECTED do |sender, selector, pos|
  @current_old_value = somehow_get_old_value_for_cell_at pos
  app.getTooltip.handle mytable, FXSEL(SEL_COMMAND, FXToolTip::ID_TIP_SHOW), nil

mytable.connect SEL_QUERY_TIP do |sender, selector, ptr|
  sender.text = @current_old_value

I'm partially successful. The tooltip shows up but only for a fraction of a second. And it doesn't show up again when the same cell or any cell is selected. The SEL_SELECTED event definitely occur when I click the cell. Any idea how to trigger tool tip manually?

Thank you in advance

Windows Live™: Keep your life in sync.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/fxruby-users/attachments/20090120/5fd536d5/attachment-0001.html>

More information about the fxruby-users mailing list