Print Page | Close Window

CXTPTabControl

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=2879
Printed Date: 08 November 2025 at 9:49pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: CXTPTabControl
Posted By: Kenneth
Subject: CXTPTabControl
Date Posted: 12 September 2005 at 3:35pm

The OnNotify callback for CXTPTabControl appears to have a major problem, or at least it is working completely different then the OnNotify callback for the CXTFlatTabCtrl and CXTTabCtrl.

When processing the TCN_SELCHANGE notification, if you issue a SetCurSel(value), where value is not the same as the CurSel value received in the OnNotify, you receive another immediate OnNotify notification.   This goes into a infinite loop!  This does not happen in the CXTTabCtrl and CXTFlatTabCtrl.

If I select the following for the color scheme, the luna color for blue is correct, but not for olive and silver.

m_TabCtrl.GetPaintManager()->SetAppearance(xtpTabAppearan ceVisualStudio2005);
 m_TabCtrl.GetPaintManager()->DisableLunaColors(FALS E);
 m_TabCtrl.GetPaintManager()->SetOneNoteColors(TRUE) ;
 

I set the color via the following call:

void CTabSwitch::SetTheme(int theme,int scheme)
 {
 if(scheme >= 10 && scheme <= 12)
      {
      if(theme == 10)
           XTPColorManager()->SetLunaTheme(xtpSystemThemeBlue);
      if(theme == 11)
           XTPColorManager()->SetLunaTheme(xtpSystemThemeOlive);
      if(theme == 12)
           XTPColorManager()->SetLunaTheme(xtpSystemThemeSilver);
      m_flatTabCtrl.GetPaintManager()->SetColor(xtpTabColorVisu alStudio);
      }
 else if(scheme == 3)
      m_TabCtrl.GetPaintManager()->SetColor(xtpTabColorOffice20 03);
      else
      m_TabCtrl.GetPaintManager()->SetColor(xtpTabColorWinXP);
 }




Replies:
Posted By: Kenneth
Date Posted: 13 September 2005 at 12:58pm
The behavior of the CXTPTabControl OnNotify callback is really bizarre.  The developer really needs to implement a OnNotify callback and monitor when the TCN_SELCHANGE is being sent.  It defies any logic I have seen, including sending TCN_SELCHANGE notifications when tabs are being inserted and when a SetCurSel is issued.



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