Solved

Tooltip behaviour on tree after IE4 installation

Posted on 1998-12-09
7
232 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 1

Author Comment

by:wamoz
ID: 1350275
Edited text of question
0
 
LVL 20

Expert Comment

by:Madshi
ID: 1350276
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
ID: 1350277
I suppose that's why we call it the "bleeding edge" <g>
Incidentally, IE5 has the problem too.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 20

Expert Comment

by:Madshi
ID: 1350278
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
ID: 1350279
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
ID: 1350280

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
ID: 1350281
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

Enroll in June's Course of the Month

June's Course of the Month is now available! Every 10 seconds, a consumer gets hit with ransomware. Refresh your knowledge of ransomware best practices by enrolling in this month's complimentary course for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Come and listen to Percona CEO Peter Zaitsev discuss what’s new in Percona open source software, including Percona Server for MySQL (https://www.percona.com/software/mysql-database/percona-server) and MongoDB (https://www.percona.com/software/mongo-…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

726 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