
Signature
Mick Doherty
http://dotnetrix.co.uk/nothing.html
Hi Mick,
Yes, that is basically the code I used (except I used
listBox.IndexFromPoint(e.X,e.Y) instead of a for() loop to get the index of
the line under the mouse cursor).
> So it's not the tabcontrols tooltip, but a control on the tabpage that is
> showing the error.
No the tooltip belongs to the tab page, but it's not the built-in one that
displays the name of the tab page when you put the mouse over the tab (i.e
the TabPage's ToolTipText property). There are two controls on that page,
and both lose their tooltip after I click anywhere, even inside that tab page.
Was your example listbox inside a tab control? As I said, it works fine for
all other tab pages. I know it sounds like a cop-out, but I am starting to
suspect it's a .NET problem.
Incidentally are you the Mick Doherty of Lemmy fame?
Cheers,
Sholto
> So it's not the tabcontrols tooltip, but a control on the tabpage that is
> showing the error.
[quoted text clipped - 17 lines]
> }
> ///
Mick Doherty - 28 Feb 2005 10:07 GMT
I missed that IndexFromPoint() method, but modifying the code to use that
instead results in the same correct behaviour.
Yes, the listbox is a child of tabPage1, and it makes no difference what I
select when I come back to tabPage1 and move the mouse over the listBox, or
any other control on the tabpage, the Tooltip updates and displays as
expected.
In my case the Tooltip was a component of the form and not of the tabPage,
however, I just created a TabPage with a built in ToolTip Component and
used that instead. The tooltip still displays as expected.
No I'm not that Mick Doherty.

Signature
Mick Doherty
http://dotnetrix.co.uk/nothing.html
> Hi Mick,
> Yes, that is basically the code I used (except I used
[quoted text clipped - 19 lines]
> Cheers,
> Sholto