Re: FXTreeList, tooltips, and SEL_QUERY_TIP

Devin Smith <[email protected]> Tue, 20 Jun 2023 22:51:21 -0700
Newsgroups gmane.comp.lib.fox-toolkit.user
Message-ID <CABvqXomhLgbpH_7vH0Sdu7_hrV_3TDP33r48FA5BNAYU4L2a8A@mail.gmail.com>
On Sun, Jun 11, 2023 at 8:35 AM Jeroen van der Zijp <[email protected]>
wrote:

> On Sat, 10 Jun 2023 21:49:05 -0700
> Devin Smith <[email protected]> wrote:
>
> > Hi,
> >
> > I have a FXTreeList with a few items but it seems like SEL_QUERY_TIP
> > never fires. I'm actually not sure how it's supposed to execute? As a
> > result, no tool tip appears for each FXTreeItem in the list.
> >
> > Using tracelevel and/or debugging the issue I can see
> > FXTreeList::onTipTimer firing and that sets the FLAG_TIP but
> > onQueryTip never gets invoked.
> >
> > Is there some flag I need to specify to get tool tips enabled? It
> > looks like I should get them by default but that doesn't seem to be
> > working.
> >
> > I add items to the FXTreeList using FXTreeList::appendItem.
> >
> > Thanks,
>
> The tooltip is suppressed when you click on the widget, so it won't get
> in the way of you interacting with the widget.
>
> The tip timer is reset when the cursor moves into the widget, or when
> there's a mouse movement while inside the widget, and there was no
> interaction (no scrolling or dragging).
>
> If you think there must be another reason that the tip doesn't show, we
> need to collect more information on the problem.
>
>
>       -- JVZ
>

I was finally able to figure out the problem by looking at the splitter.cpp
test application. At the end of the constructor there is a rather
inconspicuous comment and invocation:

// Make a tool tip
new FXToolTip(getApp(), 0);

This was the missing instruction that I needed to add in order to "opt-in"
to getting tooltips in my FXTreeList widget.

Thanks,

Devin

_______________________________________________
Foxgui-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/foxgui-users