Solved

Tooltip behaviour on tree after IE4 installation

Posted on 1998-12-09
7
231 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

Independent Software Vendors: 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!

Question has a verified solution.

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

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

737 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