disable TListView tooltip hint

dear all; when TListView is custom drawn/painted,
the underlying native control has no clue about
how it is done, and it calculates the length of
text metrics for the TListItem.Caption (and
TListItem.SubItems.Text) strings based on the
control's default params. This triggers tooltip
window popup showing the string as a hint when
native control thinks the string is too long to
fit the corresponding column width.
How do I stop/prevent it from happening? Steps to
reproduce: drop a TListView, make it look like a
report and populate a few items with captions long
enough to not fit the column width; hover the
mouse over such a long item or subitem and you
will see the hint is displayed showing that text
in full length. If you custom draw these captions
in narrow font, the underlying native still shows
the hints. I'm looking for a VCL-based solution
instead of intercepting internal control messages. TIA. 
Boba.
0
Utf
8/18/2015 4:51:51 AM
embarcadero.cppbuilder.using 1848 articles. 1 followers. Follow

1 Replies
858 Views

Similar Articles

[PageSpeed] 59
Get it on Google Play
Get it on Apple App Store

Boba wrote:

> dear all; when TListView is custom drawn/painted,
> the underlying native control has no clue about
> how it is done, and it calculates the length of
> text metrics for the TListItem.Caption (and
> TListItem.SubItems.Text) strings based on the
> control's default params.

It is based on the width of the columns.

> drop a TListView, make it look like a report and populate
> a few items with captions long enough to not fit the
> column width; hover the mouse over such a long item or
> subitem and you will see the hint is displayed showing that
> text in full length.

As it should be.

> If you custom draw these captions in narrow font, the
> underlying native still shows the hints. I'm looking for a
> VCL-based solution instead of intercepting internal control
> messages.

Try using the TListView.OnInfoTip event (which is triggered by the LVN_GETINFOTIP 
notification) to manage the text of the toolhint.  If the tooltip is being 
displayed for a TListItem whose text is not "too long", set the event's InfoTip 
parameter to an empty string.  If that does not solve your issue, you will 
have to handle the LVN_GETINFOTIP notification directly (which you should 
do anyway, as it provides you with the subitem being displayed, which the 
OnInfoTip event does not tell you).

-- 
Remy Lebeau (TeamB)
0
Remy
8/18/2015 11:11:25 PM
Reply:

Similar Artilces:

Tooltips, Tooltips, Tooltips!!!
There seems to be an awful lot of questions lately concerning tooltips. For those of you who don't read comp.soft-sys.powerbuilder on a regular basis and don't pay too much attention to multiplatform b.s. for client applications here is a link to an excellent Rui Cruz's "Tooltips" implementation using comctl32.dll http://www.geocities.com/SiliconValley/Peaks/3889/ . It is going to be a little trickier to make this thing work with Datawindows, but not too bad :-)) (BTW, Rui has a lot of other useful stuff there). For those of you who pay attention to multip...

when do we use tooltip property and when do we use onmouseover instead
Do they have the same function. what specific scenarios we use each of'mthanksThanks a lot, I appreciate your taking the time to help me. Hi tustus, Onmouseover is an event whereas tooltip is a property. This is fairly basic question and before you post it on the forums I will recommened you to search for it on google.Or you can always purchase a starter level book on web design.CheersSunny NAGIProper Preparation Prevents Poor PerformanceDont forget to click "Mark as Answer" on the post that helped you....

tooltips using c#(images and text inside tooltip)
 hi iam using below code to display image and text in the tooltip....the problem is its working fine in Internet explorer and not showing (only text) in mozilla browser....what's the problem.....i done with asp:image but its no use  protected void Page_Load(object sender, EventArgs e)    {        if (!Page.IsPostBack)        {            getToolTipFromDB();        }    }   pri...

superreview requested: [Bug 45375] Long tooltips should wrap instead of being cropped (multiline tooltips) : [Attachment 144860] Tooltip wrapping patch (uses CRs and NLs if present)
Chris Thomas <cst@andrew.cmu.edu> has asked jag (Peter Annema) <jag@tty.nl> for superreview: Bug 45375: Long tooltips should wrap instead of being cropped (multiline tooltips) http://bugzilla.mozilla.org/show_bug.cgi?id=45375 Attachment 144860: Tooltip wrapping patch (uses CRs and NLs if present) http://bugzilla.mozilla.org/attachment.cgi?id=144860&action=edit ------- Additional Comments from Chris Thomas <cst@andrew.cmu.edu> I'm not sure which should be included. Neil and Jag can figure that out. ...

superreview cancelled: [Bug 45375] Long tooltips should wrap instead of being cropped (multiline tooltips) : [Attachment 144860] Tooltip wrapping patch (uses CRs and NLs if present)
Chris Thomas (CTho) <cst@andrew.cmu.edu> has cancelled Chris Thomas (CTho) <cst@andrew.cmu.edu>'s request for superreview: Bug 45375: Long tooltips should wrap instead of being cropped (multiline tooltips) https://bugzilla.mozilla.org/show_bug.cgi?id=45375 Attachment 144860: Tooltip wrapping patch (uses CRs and NLs if present) https://bugzilla.mozilla.org/attachment.cgi?id=144860&action=edit ...

hint :) how can i use hint near textbox1.text or label1 ??
hello friends i want to use a hint near textbox1 or label1 :) For example when i come to above textbox1 with my mouse, hint should be seen :) or A Symbol should be near textbox1.text and when i click symbol with mouse, hint should be read :) Symbol can be question mark etc. CheersMark as me if my question or my answer can be helpful for you :)  use obout flyoutسیستم آموزش مجازیسیستم مدیریت کتابخانه دیجیتالوستاگزارش ساز hi can i install flyout to visual web developer ?? can i use it with visual web developer ? and how can i use hint in flyout ? cheers  Mark as me if...

TlistView column hints works... application/hint/window not... [Edit]
Through Wndproc hooking of the listview header I have code working fine generating column strings (hints) as mouse moves over columns. But to the life of me, I can't get the hint window behave like normal Delphi does :( I can either 1) Have it update constantly so the hintwindow is always open and follows mouse cursor. (current) 2) Not working properly. Stops triggering hint messages. (I found that e.g. calling Application.CancelHint will do this. And it's impossible to reactivate with pause time. This would otherwise help me close down hint as column changes. An...

Using Using
I have just completed reading a chapter in my book on performance. The books says to speed up performance on your web site you should use the using statement when opening connections. My question is how do you catch errors if you are using this as apposed to a try catch block.thanksBryan  Why would you use it as an alternative to a try/catch statement. Couldn't you just do something like  public void UsingSomeMethod() { try { SomeMethod(); } catch(SomeException e) { /// do something useful }}public void SomeMethod() { using (Something) { ...

When to use ( and when to use ((?
I'm just not getting it. When do you use ( in a statement, when do you need to use ((, and is the space after either or both mandatory? For example, I coded this statement: if (( $_ eq $bad_guys_ip )) { more_stuff_here }; Why the two (( in an if? And why does it seem to not work when I miss the space after the ((? Thanx! Mark me as... /Corn-fused|Dense/ > I'm just not getting it. >=20 > When do you use ( in a statement, when do you need to use ((, and is > the space after either or both mandatory? >=20 > For example, I coded this sta...

How to use the arguments to use() in the package being used
Howdy,=20 The subject says it all believe it or not :) What I'm trying to figure out is how to pass an argument=20 (pragma I believe is the proper term) to use() and do=20 sonethign in the package based on it. I've looked at CGI.pm source but can't seem to track it down.=20 (Similar idea as to CGIs -oldstyle_urls -newstyel_urls) http://search.cpan.org/~lds/CGI.pm-3.04/CGI.pm#PRAGMAS What I'd like to do is something like this: # for old time's sake we'll just use our favorite module use Foo::Monkey qw(:Foo :Bar -doamazingthings); #then in Foo::Monkey...

superreview requested: [Bug 240448] Set as Default button does not disable when used : [Attachment 146058] Adds a disable to the button
Ian Neal <bugzilla@arlen.demon.co.uk> has asked Seth Spitzer <sspitzer@mozilla.org> for superreview: Bug 240448: Set as Default button does not disable when used http://bugzilla.mozilla.org/show_bug.cgi?id=240448 Attachment 146058: Adds a disable to the button http://bugzilla.mozilla.org/attachment.cgi?id=146058&action=edit ...

superreview requested: [Bug 437937] Embedding: GTK tooltips should have the tooltip hint set : [Attachment 324254] Trivial Patch
Michael Ventnor <ventnor.bugzilla@yahoo.com.au> has asked Robert O'Callahan (:roc) <roc@ocallahan.org> for superreview: Bug 437937: Embedding: GTK tooltips should have the tooltip hint set https://bugzilla.mozilla.org/show_bug.cgi?id=437937 Attachment 324254: Trivial Patch https://bugzilla.mozilla.org/attachment.cgi?id=324254&action=edit ------- Additional Comments from Michael Ventnor <ventnor.bugzilla@yahoo.com.au> We internally fixed our popup implementation for Firefox 3 to properly set hints to window managers that provide features or effects to diff...

Re: [perl #97942] [PATCH] Add -DO option to disable optimizations and disable constant folding and the peephole optimizer when used.
--------------020101080704060002010907 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi, Some of these failures are caused by the mere presence of "-D" or "-Dq" in PERL5OPT(_TEST). I have attached a patch for these tests. I also rebased the original patch against the current blead. ~Niels --------------020101080704060002010907 Content-Type: text/x-diff; name="0001-Add-DO-option-to-disable-optimizations-and-disable-c.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename*0="0001-Ad...

superreview granted: [Bug 240448] Set as Default button does not disable when used : [Attachment 146058] Adds a disable to the button
David Bienvenu <bienvenu@nventure.com> has granted Ian Neal <bugzilla@arlen.demon.co.uk>'s request for superreview: Bug 240448: Set as Default button does not disable when used http://bugzilla.mozilla.org/show_bug.cgi?id=240448 Attachment 146058: Adds a disable to the button http://bugzilla.mozilla.org/attachment.cgi?id=146058&action=edit ...

Web resources about - disable TListView tooltip hint - embarcadero.cppbuilder.using

Blogs
FireMonkey’s underlying visual control architecture has been significantly overhauled in XE8 to enable multiple presentation implementations ...

Use AnsiString And UTF8String In Delphi XE5 Firemonkey On Android And IOS
Embarcadero disabled access to byte stings in Delphi XE5 Firemonkey and if you're a long time Delphi developer you may be missing them. They ...

Turbo Vision port to the GNU compiler and more - History
Turbo Vision port to the GNU compiler and more

Blogs
Get Latest Updates On Embarcadero Products And News Information. Embarcadero Community Blog Also Discuss About The Code Samples And Snippets. ...

Contact - Delphi XE5 XE6 XE7 XE8 Firemonkey, Delphi Android, Delphi IOS
Skip to content Search for: Firemonkey eXplorer Program FMXFeeds FMXDemos FMXUniversity Submit Story Search Search for: Contact Name (required) ...

Resources last updated: 12/3/2015 10:13:21 AM