Print Page | Close Window

Tooltip in Dialog

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Controls
Forum Description: Topics Related to Codejock Controls
URL: http://forum.codejock.com/forum_posts.asp?TID=15204
Printed Date: 14 May 2024 at 1:44pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Tooltip in Dialog
Posted By: skyliou
Subject: Tooltip in Dialog
Date 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









Replies:
Posted By: Oleg
Date Posted: 18 September 2009 at 8:04am
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


Posted By: skyliou
Date Posted: 21 September 2009 at 11:49pm
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.






Posted By: skyliou
Date Posted: 22 September 2009 at 4:46am
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


Posted By: Oleg
Date Posted: 23 September 2009 at 3:52am

Hi,

See PropertiesDialog.cpp  code and its CPropertiesDialog::OnToolHitTest method.


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


Posted By: asparagusx
Date Posted: 04 March 2010 at 3:20am
 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


Posted By: markr
Date Posted: 12 July 2010 at 1:26pm
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.


Posted By: asparagusx
Date Posted: 12 July 2010 at 1:37pm
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.



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