Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - multiline tooltip
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

multiline tooltip

 Post Reply Post Reply
Author
Message
jerry2000 View Drop Down
Newbie
Newbie


Joined: 22 April 2004
Status: Offline
Points: 29
Post Options Post Options   Thanks (0) Thanks(0)   Quote jerry2000 Quote  Post ReplyReply Direct Link To This Post Topic: multiline tooltip
    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
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: 07 April 2005 at 1:27pm

unfortunaly you can't

We added it for next release.

Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
jerry2000 View Drop Down
Newbie
Newbie


Joined: 22 April 2004
Status: Offline
Points: 29
Post Options Post Options   Thanks (0) Thanks(0)   Quote jerry2000 Quote  Post ReplyReply Direct Link To This Post 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?

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: 19 April 2005 at 7:55am

9.70 release will be really soon, please wait.

Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
jerry2000 View Drop Down
Newbie
Newbie


Joined: 22 April 2004
Status: Offline
Points: 29
Post Options Post Options   Thanks (0) Thanks(0)   Quote jerry2000 Quote  Post ReplyReply Direct Link To This Post 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


Edited by jerry2000
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: 08 June 2005 at 11:09pm
pToolBar->GetControl(0)->SetTooltip(_T("line1\nline2") );
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
jerry2000 View Drop Down
Newbie
Newbie


Joined: 22 April 2004
Status: Offline
Points: 29
Post Options Post Options   Thanks (0) Thanks(0)   Quote jerry2000 Quote  Post ReplyReply Direct Link To This Post 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

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: 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
Back to Top
jerry2000 View Drop Down
Newbie
Newbie


Joined: 22 April 2004
Status: Offline
Points: 29
Post Options Post Options   Thanks (0) Thanks(0)   Quote jerry2000 Quote  Post ReplyReply Direct Link To This Post 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

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: 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
Back to Top
jerry2000 View Drop Down
Newbie
Newbie


Joined: 22 April 2004
Status: Offline
Points: 29
Post Options Post Options   Thanks (0) Thanks(0)   Quote jerry2000 Quote  Post ReplyReply Direct Link To This Post 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

Back to Top
jerry2000 View Drop Down
Newbie
Newbie


Joined: 22 April 2004
Status: Offline
Points: 29
Post Options Post Options   Thanks (0) Thanks(0)   Quote jerry2000 Quote  Post ReplyReply Direct Link To This Post Posted: 17 June 2005 at 4:52am
Please help, its realy important for our project.
thx

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: 17 June 2005 at 6:41am
remove CBRS_TOOLTIPS
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
jerry2000 View Drop Down
Newbie
Newbie


Joined: 22 April 2004
Status: Offline
Points: 29
Post Options Post Options   Thanks (0) Thanks(0)   Quote jerry2000 Quote  Post ReplyReply Direct Link To This Post Posted: 27 June 2005 at 9:16am
thanks
now it works fine
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.188 seconds.