 |
|
 |
This is a good article.
But I have a problem using this class.
In in function TextRetriever,I want to use the itemData to set the tooltip text.
m_ListBox.GetItemDataPtr(nIndex);
And there is a error:
"left of '.GetItemDataPtr' must have class/struct/union"
Can anyone give me some suggestions?
Thanks
|
|
|
|
 |
|
 |
Oh,i got it. TextRetriever is static. Sorry. There is another question,can the tooltip be auto word-wrap? I mean set a fixed width, and long text will be wrapped automatically
|
|
|
|
 |
|
 |
Hi,
Thank you for the class. It saved me a lot of time.
I did make some improvements to your class. I needed the tooltip to show next to the cursor position, so I made a flag for that. I also changed CTTListBox and CTooltip2 to also allow the user to move the cursor over the tooltip without the tooltip changing or closing.
Also changed it so that when the Tooltip is already up, and the mouse moves to the next item, it will bring up the tip immediately instead of another hover timeout taking place.
If you want any of these changes send me an email ali__2@yahoo.com (2 underscores)
AliR.
Due to high demand : Here is a link to the modified version Click here to Download
-- modified at 14:25 Wednesday 8th November, 2006
|
|
|
|
 |
|
 |
How can i select item in list box
|
|
|
|
 |
|
 |
how can I make tool tip appear after clicking on listbox item
|
|
|
|
 |
|
 |
I want to cahnge the background color formy b>ListBox...how can i do that....
|
|
|
|
 |
|
 |
Hello,
How can i have different tooltips for different List Boxes in a dialog?
Thanks,
Pepe
|
|
|
|
 |
|
 |
Hi Salman,
Thanks for posting this. I used it, slightly modified to display the tips attached to the cursor, to display very large tooltips for items in a CListCtrl but I have a problem which is not with your code but you may know the answer anyway.
All machines mentioned are running W2K-SP2.
On my machine (Athlon 700/384MB) there is a delay of 0.5 - 1.0 seconds before the tip appears. I originally put this down to the large amount of data that had to be collated and formatted, but when I ran it on another, slower (PII-450/128MB) machine the display was instantaneous so quick that when moving the mouse rapidly over the list box the tooltip stayed "attached" to the cursor and the text updated in real time). I tried it on an identical machine (PII-450/128MB) and the display speed was the same as on my Athlon.
I have searched the registry on all 3 machines but cannot find any setting that may influence this. I've also searched MSDN, TechNet, newsgroups, and the Web, all without success. Do you, or anyone else reading this, have any idea how to change this delay (so to make the display instantaneous)?
Thanks.
Mark.
|
|
|
|
 |
|
 |
I found it! It is controlled by the MENU! delay, the MenuShowDelay value in HKEY_CURRENT_USER\Control Panel\Desktop
I'd changed this without success, but I didn't realize that you had to logout and log back in for it to take effect. Works great now
BTW, I discovered that if I removed the call to m_ToolTip.Close() in ShowToolTip() the flicker is reduced when moving the mouse quickly. This is even noticable in TTListBoxDemo but is very noticable in my app where the tooltip itself is the size of the whole window in TTListBoxDemo.
|
|
|
|
 |
|
 |
it is a nice idea, but the tooltip window comes at the end of the listbox, whereas it should have been below the arrow of the cursor.
laxman
|
|
|
|
 |
|
 |
I can e-mail you a version that has another function which implements the functionality that you want. Let me know if you would like me to do that. Its very easy to implement.
Salman
|
|
|
|
 |