Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Report Control
  New Posts New Posts RSS Feed - HOWTO: Set tooltip style for item tooltip
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

HOWTO: Set tooltip style for item tooltip

 Post Reply Post Reply
Author
Message
mgampi View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14 July 2003
Status: Offline
Points: 1198
Post Options Post Options   Thanks (0) Thanks(0)   Quote mgampi Quote  Post ReplyReply Direct Link To This Post Topic: HOWTO: Set tooltip style for item tooltip
    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
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
mgampi View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14 July 2003
Status: Offline
Points: 1198
Post Options Post Options   Thanks (0) Thanks(0)   Quote mgampi Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
mgampi View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14 July 2003
Status: Offline
Points: 1198
Post Options Post Options   Thanks (0) Thanks(0)   Quote mgampi Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
mgampi View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14 July 2003
Status: Offline
Points: 1198
Post Options Post Options   Thanks (0) Thanks(0)   Quote mgampi Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
znakeeye View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 July 2006
Status: Offline
Points: 1672
Post Options Post Options   Thanks (0) Thanks(0)   Quote znakeeye Quote  Post ReplyReply Direct Link To This Post 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/
Back to Top
mgampi View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14 July 2003
Status: Offline
Points: 1198
Post Options Post Options   Thanks (0) Thanks(0)   Quote mgampi Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
mgampi View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14 July 2003
Status: Offline
Points: 1198
Post Options Post Options   Thanks (0) Thanks(0)   Quote mgampi Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
znakeeye View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 July 2006
Status: Offline
Points: 1672
Post Options Post Options   Thanks (0) Thanks(0)   Quote znakeeye Quote  Post ReplyReply Direct Link To This Post 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/
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.156 seconds.