Print Page | Close Window

multiline tooltip

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=2090
Printed Date: 08 November 2025 at 9:26am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: multiline tooltip
Posted By: jerry2000
Subject: multiline tooltip
Date Posted: 07 April 2005 at 8:57am
Hi

How can i set a multiline tooltip of an button a toolbar? When I use \r\n in SetTooltip it doesn't work.
thanks



Replies:
Posted By: Oleg
Date Posted: 07 April 2005 at 1:27pm

unfortunaly you can't

We added it for next release.



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


Posted By: jerry2000
Date Posted: 18 April 2005 at 4:17am
Is it possible to make a workoround in the meantime.
For example somthing like this in the correct place??

m_ToolTip.SendMessage(TTM_SETMAXTIPWIDTH, 0, SHRT_MAX);

This would be enable the multi line feature.


When is the next version available?



Posted By: Oleg
Date Posted: 19 April 2005 at 7:55am

9.70 release will be really soon, please wait.



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


Posted By: jerry2000
Date Posted: 07 June 2005 at 9:21am
Hi,
I have now downloaded and installed the 9.70 RC1. How can i use now the multiline tooltip feature for toolbar buttons?

thx


Posted By: Oleg
Date Posted: 08 June 2005 at 11:09pm
pToolBar->GetControl(0)->SetTooltip(_T("line1\nline2") );

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


Posted By: jerry2000
Date Posted: 09 June 2005 at 6:14am
Sorry but this does not work, only one line with the whole text is displayed!

Which class is displaying the tooltip, XTPToolTipContext ? When I find the class i can help you to find the problem.
thx



Posted By: Oleg
Date Posted: 11 June 2005 at 3:37pm

It must.

steps:

1. Open GUI_VisualStudio sample

2. comment line

LoadCommandBars(_T("CommandBars"));

3. add line

pCommandBar->GetControl(0)->SetTooltip(_T("line1\nline 2"));

 

4. First button must show multiline tip. (for 9.70 rc1 and higher)



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


Posted By: jerry2000
Date Posted: 13 June 2005 at 7:46am
I have found the problem, it works, but not everywhere!

I have 2 toolbars with 2 different styles (one Office 2003, one Longhorn)

Toolbar 1 does work


but toolbar 2 not


You see, it is a combobox, but the toolbar also not working at a button.


Any Idea??
thx



Posted By: Oleg
Date Posted: 14 June 2005 at 5:10am

as I understand secont bar is simple m_wndToolBar created with CreateToolBar

if so, you must assign some CommandBars to it before you create it:

 

CXTPCommandBars* m_pCommandBars;

 

m_pCommandBars = CXTPCommadnBars::CreateCommandBars();

m_wndToolBar.SetCommandBars(m_pCommandBars);

m_wndToolBar.CreateToolBar

...

 



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


Posted By: jerry2000
Date Posted: 14 June 2005 at 10:37am
Thank you for the help
Sorry about that, but now it looks like that:



You see the tooltip is displayed now 2 times. I have implemented the toolbar as a class derived from CXTPToolBar. In an init function i create the toolbar with following lines:


m_pCommandBars = CXTPCommandBars::CreateCommandBars();
SetCommandBars(m_pCommandBars);
m_pCommandBars->SetSite(this);  // without this line i got an assertion if the mouse is moved over a toolbar control

VERIFY(CreateToolBar(WS_VISIBLE|WS_CHILD|CBRS_TOOLTIPS, pParent, AFX_IDW_TOOLBAR));
SetFlags(xtpFlagStretched|xtpFlagManualUpdate);

// set new color of keyselbar
SetPaintManager(CXTPPaintManager::CreateTheme(xtpThemeWhid bey));
GetPaintManager()->SetTheme(xtpThemeWhidbey);
m_pOwner = this; // to get the ON_COMMAND Messages of the bar to our own class


What i doing wrong?
thx



Posted By: jerry2000
Date Posted: 17 June 2005 at 4:52am
Please help, its realy important for our project.
thx



Posted By: Oleg
Date Posted: 17 June 2005 at 6:41am
remove CBRS_TOOLTIPS

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


Posted By: jerry2000
Date Posted: 27 June 2005 at 9:16am
thanks
now it works fine



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