Solved

Tooltip behaviour on tree after IE4 installation

Posted on 1998-12-09
7
230 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
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
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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

Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

Question has a verified solution.

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

Suggested Solutions

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

828 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