Print Page | Close Window

HOWTO: Set tooltip style for item tooltip

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Report Control
Forum Description: Topics Related to Codejock Report Control
URL: http://forum.codejock.com/forum_posts.asp?TID=12839
Printed Date: 09 May 2024 at 4:45pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: HOWTO: Set tooltip style for item tooltip
Posted By: mgampi
Subject: HOWTO: Set tooltip style for item tooltip
Date Posted: 02 December 2008 at 5:23pm
Hi;
I call GetToolTipContext()->SetStyle(xtpToolTipOffice2007) but the tooltip that pops up for hidden item text is still drawn like an old style tooltip.

Does anyone know how to change this tooltip also to Office2007 style?


-------------
Martin

Product: Xtreme Toolkit v 19.0.0, new Projects v 19.1.0
Platform: Windows 10 v 1909 (64bit)
Language: VC++ 2017



Replies:
Posted By: Oleg
Date Posted: 03 December 2008 at 4:41am

Hi,

Tooltips for Hidden text don't use ToolTipContext.  :(
You can call SetTooltip for all items to show Office 2007 tips.
 


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: mgampi
Date Posted: 03 December 2008 at 5:52am
Originally posted by oleg oleg wrote:

You can call SetTooltip for all items to show Office 2007 tips.


But this will also double the size required to show records in the control  (each item string is contained twice).
I have to show several thousand records grouped by some columns, so I can't use the control in virtual mode...

No other solutions possible? How can I replace the internal tooltip by my own control?


-------------
Martin

Product: Xtreme Toolkit v 19.0.0, new Projects v 19.1.0
Platform: Windows 10 v 1909 (64bit)
Language: VC++ 2017


Posted By: Oleg
Date Posted: 03 December 2008 at 12:07pm
Hi,
Anoter option - create special Item class for your items, override "virtual CString GetTooltip() const"; method and return Caption.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: mgampi
Date Posted: 15 December 2008 at 7:34am
Hi Oleg;

will this be changed in coming releases, so that the item tooltip also uses the tooltip context?


-------------
Martin

Product: Xtreme Toolkit v 19.0.0, new Projects v 19.1.0
Platform: Windows 10 v 1909 (64bit)
Language: VC++ 2017


Posted By: mgampi
Date Posted: 10 July 2009 at 5:19am
Hi Oleg;

will this be implemented (soon)?


-------------
Martin

Product: Xtreme Toolkit v 19.0.0, new Projects v 19.1.0
Platform: Windows 10 v 1909 (64bit)
Language: VC++ 2017


Posted By: znakeeye
Date Posted: 10 July 2009 at 6:27am

I've already done this with all my record items. It's simple. Like Oleg said:

class CReportRecordItemText : public CXTPReportRecordItemText
{
public:
    virtual CString GetTooltip() const { return GetCaption(); }
};
 


-------------
PokerMemento - http://www.pokermemento.com/


Posted By: mgampi
Date Posted: 10 July 2009 at 6:33am
Hi;

but this leads to another problem: callin a non const member within a const member function.
And what happens to the tooltip if markup is used?
It's also not usable if the text for the item is provided by CmyRecord::GetItemMetrics() (pItemMetrics->strText) because in this case the caption is not set!

-------------
Martin

Product: Xtreme Toolkit v 19.0.0, new Projects v 19.1.0
Platform: Windows 10 v 1909 (64bit)
Language: VC++ 2017


Posted By: mgampi
Date Posted: 10 July 2009 at 6:54am
Another issue:

With this solution, the tooltip is no longer inplace!!!!


-------------
Martin

Product: Xtreme Toolkit v 19.0.0, new Projects v 19.1.0
Platform: Windows 10 v 1909 (64bit)
Language: VC++ 2017


Posted By: znakeeye
Date Posted: 10 July 2009 at 9:32am
No longer inplace? Don't follow here.
 
Markup --> use markup tooltips or strip markup code from caption. Not a big deal.
 
Virtual mode? I guess you need som special logic for that.


-------------
PokerMemento - http://www.pokermemento.com/



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net