[haiku-development] Re: BToolTip?

  • From: Pete Goodeve <pete.goodeve@xxxxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Fri, 29 Mar 2013 23:20:26 -0700

On Fri, Mar 29, 2013 at 11:06:56PM -0400, Ryan Leavengood wrote:
> On Fri, Mar 29, 2013 at 10:34 PM, Pete Goodeve
> 
> As long as you know the location of the icons and can determine when
> the mouse if over one, you can set the tooltip appropriately. You just
> implement GetTooltipAt(BPoint point, BToolTip** _tip) on the
> background view. Here is one decent example that I am familiar with:
> 
> http://cgit.haiku-os.org/haiku/tree/src/preferences/time/TimeZoneListView.cpp
> 

Sorry -- I still seem to be missing some vital insight.

How does GetTooltipAt get invoked?  I dup out an old test program
with a BView, and added that method -- very basically:

bool
TBox::GetToolTipAt(BPoint point, BToolTip** _tip)
{
        printf("GetToolTipAt called\n");
        SetToolTip("Test");

        *_tip = ToolTip();

        return true;
}

assuming that it would get called when I held the mouse over
the view, but it never is.

I don't see anything in your code that would specificallly tell it
to do so,  What's wrong?

Thanks,
        -- Pete --

Other related posts: