Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

TreeView Control 2

Status
Not open for further replies.

Salmano

Programmer
Oct 4, 2001
34
0
0
RO
Hi !

I use VFP6 and TreeViewControl 6.
Do you know how could I disable the tooltips that appear when the text is larger than the tree width ?

Thank you.
 
Salmano,

I don't think you can (where there's a will there's a way maybe). The treeview doesn't have a property for setting them off, and setting showtips to .F. for the form doesn't affect the control. There may be a way to shut them off through API calls but I don't know it...I'm thinking that maybe if you had the hwnd to the control that maybe there is an API to send a message to it telling it to shut them off...I guess they thought it was such a good feature you wouldn't want to ever shut it off. :)

Slighthaze = NULL

[ul][li]FAQ184-2483
An excellent guide to getting a fast and accurate response to your questions in this forum.[/li][/ul]
 
Salmano

At the form level set the ShowTips to .F..


Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Mike,
At the form level set the ShowTips to .F.

This does not effect the treeview control.

Slighthaze = NULL

[ul][li]FAQ184-2483
An excellent guide to getting a fast and accurate response to your questions in this forum.[/li][/ul]
 
I've already tried setting showtips to .F. and it's true, it doesn't affect the treeview control, unfortunately...

Thank you both !
 
Salmano

Perhaps you may have better luck with the Outline Control to show a directory structure (untested). faq184-3096.

Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
I was wondering... is it possible to write the text in treeview control on more than 1 line ? i've tried something like "aaa" + chr(13) + "bbb" but it doesn't work...

Got any ideea ?
 

I was wondering... is it possible to write the text in treeview control on more than 1 line ? i've tried something like "aaa" + chr(13) + "bbb" but it doesn't work...

Faq184-3121



Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Salmano

Do you know how could I disable the tooltips that appear when the text is larger than the tree width

This code tested under W2K

---------------------
Declare Long FindWindow in User32 ;
String cClass, String cTitle
Declare Integer SendMessage in User32 ;
Long nhWnd, Integer Msg, Integer wParam, Long lParam

*** Disable TreeView ToolTips if found
cToolTips = 'msvb_lib_tooltips'
SendMessage(FindWindow(cToolTips, Null), 0x10, 0, 0)
---------------------

Regards

-- AirCon --
 
AirCon,
Another excellent solution. Congratulations!
By the way, how did you know that the window class is 'msvb_lib_tooltips'? What tools do you use?
 
Aircon,

I used Spy++ that comes with VS6 and found the class to be
'TreeView20WndClass', used it with your code and got the same wonderful result. As csandu00 asked what did you use to find the class name that you came up with. Also, interestingly enough...once you have shut the tooltips off if you set ShowTips to .T. it then DOES effect the treeview control. Well I gotta give you a star on this one...nice job.

Slighthaze = NULL

[ul][li]FAQ184-2483
An excellent guide to getting a fast and accurate response to your questions in this forum.[/li][/ul]
 
csandu00 & Slighthaze

I don't use any tools. I have my own code to list all the windows (like Spy++). This is how I get the class name (msvb_lib_tooltips).

SendMessage(hTreeView, TVM_GETTOOLTIPS, 0, 0)

Where: hTreeView is a handle to 'TreeView20WndClass'

By using this class name, we only need to find one window. Much shorter ways

Regards

-- AirCon --
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top