Tooltip in Dialog |
Post Reply |
Author | |
skyliou
Newbie Joined: 27 August 2009 Location: Taiwan Status: Offline Points: 6 |
Post Options
Thanks(0)
Posted: 17 September 2009 at 11:51pm |
Hi Oleg,
I try to add tooltip in a Dialog button, now it's work. but i want to change style to another style, it's can't work. (like Standard style -> xtpToolTipOffice2007) i have try ToolTipContext_vc90 this sample, but in my opinion it can only change in commandbar's component. (i don't know how to use like "CXTPCommandBars* pCommandBars = GetCommandBars();" in Dialog based) can you give me a sample or help me to change style at button's tooltip thank you very much james |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
ToolTipContext samples also demonstrates hwo to enable tooltips for Dialog controls too.
You need same lines:
EnableToolTips();
m_moduleContext.SetModuleToolTipContext(); m_moduleContext.SetStyle(xtpToolTipOffice2007); m_moduleContext.SetMaxTipWidth(200); |
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
skyliou
Newbie Joined: 27 August 2009 Location: Taiwan Status: Offline Points: 6 |
Post Options
Thanks(0)
|
Hi Oleg,
i have try your way EnableToolTips(); m_moduleContext.SetModuleToolTipContext(); m_moduleContext.SetStyle(xtpToolTipOffice2007); m_moduleContext.SetMaxTipWidth(200); but i don't know how to correctly add tooltipcontext in a dialog based project i can't get value in CMainFrame* pMainFrame = (CMainFrame*)AfxGetMainWnd(); CXTPCommandBars* pCommandBars = pMainFrame->GetCommandBars(); can you tell me how to use GetCommandBars() in a dialog at first should i copy below file to my project folder ToolTipContextView.h/cpp ToolTipContextDoc.h/cpp ToolTipContext.h/cpp MainFrm.h/cpp ExplorerTheme.h/cpp ControlFavorites.h/cpp ChildFrm.h/cpp sorry, i am very confuse. |
|
skyliou
Newbie Joined: 27 August 2009 Location: Taiwan Status: Offline Points: 6 |
Post Options
Thanks(0)
|
Hi Oleg,
i have a Cbutton i want to use ToolTipContext in xtpToolTipOffice2007 style. i use EnableToolTips(); m_moduleContext.SetModuleToolTipContext(); m_moduleContext.SetStyle(xtpToolTipOffice2007); m_moduleContext.SetMaxTipWidth(200); in OninitialDialog, but it can't use in Cbutton, i found it can use in Toolbar can you tell me how to use in Cbutton thank you very much, Oleg James |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi, See PropertiesDialog.cpp code and its CPropertiesDialog::OnToolHitTest method.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
asparagusx
Groupie Joined: 06 February 2007 Status: Offline Points: 53 |
Post Options
Thanks(0)
|
This does not work at all. I have the same problem. It appears as if only standard tips are supported in Dialogs e.g. you cannot set something like Luna or Office2007 as styles for dialogs. This is a serious shortcoming as it would be nice to have the same 'look and feel' for tooltips across an application.
Anton
|
|
markr
Senior Member Joined: 01 August 2004 Status: Offline Points: 443 |
Post Options
Thanks(0)
|
I can't get this to work either.
Oleg, it is possible to have a toolbar in a dialog support the Office2007 theme (with title and desciption, etc.)? The sample does NOT achieve this. |
|
asparagusx
Groupie Joined: 06 February 2007 Status: Offline Points: 53 |
Post Options
Thanks(0)
|
I have been using the latest version (13.4.0) and this has not yet been implemented. A 'cluncky' workaround is to use Markup tooltips, e.g. using a StackPanel and Textblocks to produce the same 'look and feel' e.g. a title and description. The problem is that the markup tooltips are fully under your control, so they do look slightly different to the rest of the system. The optimum way would be for CJ to implement tooltips fully across all windows/toolbars.
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |