Is there any way to add tooltips to a FXTable? I''d especially like to have a tooltip on the row and column headers. Thanks, Jason This message and any enclosures are intended only for the addressee. Please notify the sender by email if you are not the intended recipient. If you are not the intended recipient, you may not use, copy, disclose, or distribute this message or its contents or enclosures to any other person and any such actions may be unlawful. Ball reserves the right to monitor and review all messages and enclosures sent to or from this email address.
My FXTable appears to support tooltips because when I mouse over a column or row header it pops up the same text in the header itself. How do I set this text to my own custom value? I don''t see any methods for it and using "Header Text\tTip Text" as the header value doesn''t seem to work. Thanks, Jason This message and any enclosures are intended only for the addressee. Please notify the sender by email if you are not the intended recipient. If you are not the intended recipient, you may not use, copy, disclose, or distribute this message or its contents or enclosures to any other person and any such actions may be unlawful. Ball reserves the right to monitor and review all messages and enclosures sent to or from this email address.
On Aug 24, 2007, at 4:49 PM, Thomas, Jason M ((Software)) wrote:> Is there any way to add tooltips to a FXTable? I''d especially like to > have a tooltip on the row and column headers.Sorry for the delay in responding to this, I''ve been traveling a lot. I assume that by now you''ve see Jeroen''s answer to Ryan''s question on the FOX Users'' Mailing List, here: http://tinyurl.com/35qrm3 Hope this helps, Lyle
So it sounds like I have to wait until 1.7 is released. What is your release procedure with respect to FOX releases? Jason -----Original Message----- From: Lyle Johnson [mailto:lyle.johnson at gmail.com] Sent: Monday, August 27, 2007 1:58 PM To: Thomas, Jason M (Software) Cc: fxruby-users at rubyforge.org Subject: Re: [fxruby-users] FXTable tooltips On Aug 24, 2007, at 4:49 PM, Thomas, Jason M ((Software)) wrote:> Is there any way to add tooltips to a FXTable? I''d especially like to > have a tooltip on the row and column headers.Sorry for the delay in responding to this, I''ve been traveling a lot. I assume that by now you''ve see Jeroen''s answer to Ryan''s question on the FOX Users'' Mailing List, here: http://tinyurl.com/35qrm3 Hope this helps, Lyle This message and any enclosures are intended only for the addressee. Please notify the sender by email if you are not the intended recipient. If you are not the intended recipient, you may not use, copy, disclose, or distribute this message or its contents or enclosures to any other person and any such actions may be unlawful. Ball reserves the right to monitor and review all messages and enclosures sent to or from this email address.
On Aug 27, 2007, at 3:02 PM, Thomas, Jason M ((Software)) wrote:> So it sounds like I have to wait until 1.7 is released. What is your > release procedure with respect to FOX releases?At some point in the future, Jeroen will decide that he''s finished with the work that he''s doing on the 1.7 branch, and he''ll release that as FOX 1.8. At some point after that---usually within a month or so---I''ll release FXRuby 1.8.
On Aug 27, 2007, at 11:00 AM, Thomas, Jason M ((Software)) wrote:> My FXTable appears to support tooltips because when I mouse over a > column or row header it pops up the same text in the header itself. > How > do I set this text to my own custom value?There''s not a convenient way to do this in FXRuby 1.6, but I just tried this and it seems to work: # Override default tooltips for the column header table.columnHeader.connect(SEL_QUERY_TIP) do |sender, sel, ptr| x, y, btns = table.columnHeader.getCursorPosition() index = table.columnHeader.getItemAt(x) if index >= 0 && index < table.columnHeader.numItems sender.text = "tooltip text for item #{index}" end end If you''re doing it for the row header, be sure to call getItemAt(y) instead of getItemAt(x). Per Jeroen, this should be much more straightforward in FOX and FXRuby 1.8. Hope this helps, Lyle
This is exactly what I was looking for, thanks! I found it also works for FXTabItems in a FXTabBook. My code looks like this: tab = FXTabItem.new(@tabbook, "&#{name}", nil) tab.connect(SEL_QUERY_TIP, method(:onTableTabMouseover)) ... def onTableTabMouseover(sender, sel, ptr) sender.text = my_tab_text End It looks like to me you can connect a method to SEL_QUERY_TIP on just about anything to override the tool tip text. Jason -----Original Message----- From: Lyle Johnson [mailto:lyle.johnson at gmail.com] Sent: Tuesday, August 28, 2007 8:51 AM To: Thomas, Jason M (Software) Cc: fxruby-users at rubyforge.org Subject: Re: [fxruby-users] FXTable tooltips On Aug 27, 2007, at 11:00 AM, Thomas, Jason M ((Software)) wrote:> My FXTable appears to support tooltips because when I mouse over a > column or row header it pops up the same text in the header itself. > How > do I set this text to my own custom value?There''s not a convenient way to do this in FXRuby 1.6, but I just tried this and it seems to work: # Override default tooltips for the column header table.columnHeader.connect(SEL_QUERY_TIP) do |sender, sel, ptr| x, y, btns = table.columnHeader.getCursorPosition() index = table.columnHeader.getItemAt(x) if index >= 0 && index < table.columnHeader.numItems sender.text = "tooltip text for item #{index}" end end If you''re doing it for the row header, be sure to call getItemAt(y) instead of getItemAt(x). Per Jeroen, this should be much more straightforward in FOX and FXRuby 1.8. Hope this helps, Lyle This message and any enclosures are intended only for the addressee. Please notify the sender by email if you are not the intended recipient. If you are not the intended recipient, you may not use, copy, disclose, or distribute this message or its contents or enclosures to any other person and any such actions may be unlawful. Ball reserves the right to monitor and review all messages and enclosures sent to or from this email address.