Solved

Tooltip behaviour on tree after IE4 installation

Posted on 1998-12-09
7
227 Views
Last Modified: 2010-04-04
After I installed IE4, tooltips began appearing over TTreeView controls irrespective of the control settings regarding tooltips. I think this has to do with MS modifications to the windows tree control to allow it to display the full caption of of the node under the mousepointer when the caption is truncated due to the size of the control window.

Can anyone shed any light on this and is there a patch, either for the VCL or for Windows, to correct it?
0
Comment
Question by:wamoz
7 Comments
 
LVL 1

Author Comment

by:wamoz
Comment Utility
Edited text of question
0
 
LVL 20

Expert Comment

by:Madshi
Comment Utility
It has surely to do with a new comCtrl.dll. But I didn't experience this problem so far, so I don't know any way around it...

Regards, Madshi.
0
 
LVL 1

Author Comment

by:wamoz
Comment Utility
I suppose that's why we call it the "bleeding edge" <g>
Incidentally, IE5 has the problem too.
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 20

Expert Comment

by:Madshi
Comment Utility
Can you perhaps post here a little demo project, that shows the problem. Perhaps then I can help you...

Regards, Madshi.
0
 
LVL 10

Accepted Solution

by:
Lischke earned 100 total points
Comment Utility
Hi wamoz,

with the update of your ComCtl32.DLL (which happend by installing IE4), a new behaviour regarding tootips has been introduced. Unfortunately tootips are enabled by default. D3 doesn't know about this feature, while D4's treeview has a new property, called Tooltips.

To disable tooltips under D3 you have to derive an own class from TTreeView and must override CreateParams:

type
  TNoTTTreeView = class(TTreeView)
  protected
    procedure CreateParams(var Params: TCreateParams); override;
  end;

procedure TNoTTTreeView.CreateParams(var Params: TCreateParams);
begin
  inherited;
  Params.Style:=Params.Style or TVS_NOTOOLTIPS;
end;

This will permanently switch off tooltips for your trees. I you don't want to derive an own tree class then you have a problem without solution, because in order to change this style the window of the tree needs to be recreated.

Ciao, Mike

BTW: If you want a better treeview (including info tips, which are a mean to callback the application about the content of a tooltip, check boxes, multi selection etc. etc.) for free then look at www.delphipages.com (Tree/List section).
0
 

Expert Comment

by:alpe
Comment Utility

There is no need to create a new component on the top of the TTreeView.
You can change the style of common controls at runtime. Use SetWindowLong and GetWindowLong pair in the following form:

procedure SwitchToolTipsOff;
begin
  SetWindowLong(TreeView1.Handle, GWL_STYLE, GetWindowLong(TreeView1.Handle, GWL_STYLE) or TVS_NOTOOLTIPS);
end;

0
 
LVL 1

Author Comment

by:wamoz
Comment Utility
Thank you Alpe.

Although I prefer the answer that I have already accepted for new works, that little tidbit will be handy for retrofitting existing code.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
This video discusses moving either the default database or any database to a new volume.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now