Print Page | Close Window

Tooltips in CXTPStatusBar

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=5730
Printed Date: 13 November 2025 at 9:47am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Tooltips in CXTPStatusBar
Posted By: grudy
Subject: Tooltips in CXTPStatusBar
Date Posted: 08 December 2006 at 3:39pm
Seems like a simple item, but how do I set the text and display a tooltip when I hover over the panes of a CXTPStatusBar control?  Looks like I can use "GetPane(x)->SetTooltip( )", but I don't ever see the tooltip - what do I have to call to enable it to popup?



Replies:
Posted By: Simon HB9DRV
Date Posted: 13 February 2007 at 5:05am
Did you get a reply or find a solution?

-------------
Simon HB9DRV


Posted By: Oleg
Date Posted: 13 February 2007 at 7:29am
Hm. strange.
 
I opened Customthemes sample, added
m_wndStatusBar.GetPane(1)->SetTooltip("hi");
 
and see tooltip under "CAP" item...
 


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


Posted By: Simon HB9DRV
Date Posted: 13 February 2007 at 8:49am
Originally posted by oleg oleg wrote:

Hm. strange.
 
I opened Customthemes sample, added
m_wndStatusBar.GetPane(1)->SetTooltip("hi");
 
and see tooltip under "CAP" item...
 
How about adding a tooltip to the icon in the StatusBar sample?


-------------
Simon HB9DRV


Posted By: grudy
Date Posted: 13 February 2007 at 9:08am
The "adding tooltip to the icon" issue is closer to what we have. I too can see tooltips if I just use SetIndicators to create the items, but we are placing buttons onto the status bar with code that looks like the following...
 
if ( wndButtonOut.Create( "", WS_CHILD, CRect(0,0,0,0), this, IDTR_OutputSetButton ) )
 {
  wndButtonOut.SetFontEx( GetFont() );
  AddIndicator( IDTR_OutputSetButton, 1 );
  int nIndex = CommandToIndex( IDTR_OutputSetButton );
  if ( nIndex != -1 )
  {
   SetPaneWidth( nIndex, 60 );
   wndButtonOut.SetXButtonStyle( BS_XT_XPFLAT | BS_XT_HILITEPRESSED, TRUE );
   AddControl( &wndButtonOut, IDTR_OutputSetButton, FALSE );
  }
 }
 
 
It works fine to create the buttons, and everything works, except that the tooltips don't show, just like the tooltips for the icon in StatusBar.


Posted By: Oleg
Date Posted: 13 February 2007 at 9:16am
Don't use CXTPStatusBarIconPane/CXTPStatusBarLogoPane they are quite obsolete.
 
Here code you can use instead:
 
 int iIndex = m_wndStatusBar.GetPaneCount();
 CXTPStatusBarPane* pPane = m_wndStatusBar.AddIndicator(ID_INDICATOR_ICON, iIndex);
 m_wndStatusBar.GetImageManager()->SetIcon(IDR_STATUS_ICON, IDR_STATUS_ICON);
 pPane->SetIconIndex(IDR_STATUS_ICON);
 pPane->SetText(NULL);
 pPane->BestFit();
 pPane->SetTooltip(_T("Icon"));
 
 
Need to update sample :(


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


Posted By: Simon HB9DRV
Date Posted: 13 February 2007 at 9:18am
Originally posted by oleg oleg wrote:

Need to update sample :(
Thanks


-------------
Simon HB9DRV


Posted By: Kenneth
Date Posted: 27 July 2007 at 10:39am

We are placing a CAnimateCtrl on a CXTPStatusBar with a style of ACS_TRANSPARENT using the AddControl function.  Is there a way to do this so the control will have theme support?  Currently the ACS_TRANSPARENT color shows up as gray instead of the theme color.




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