Property Page Tab should highlight
-
Hi, I am working on VC++ project. Property Sheet has a number of property pages, so I want to highlight each property page TAB on its selection. Hightlight means it may paint each page TAB portion or should show same TAB text with different color. Would you tell me the the way, How can I do it? Thanks in advance, Ramesh :-O
-
Hi, I am working on VC++ project. Property Sheet has a number of property pages, so I want to highlight each property page TAB on its selection. Hightlight means it may paint each page TAB portion or should show same TAB text with different color. Would you tell me the the way, How can I do it? Thanks in advance, Ramesh :-O
You can do that in the OnSetActive() method... Also take a look at the GetTabControl() method of the CPropertySheet Class. It returns a reference to a particular CTabCtrl object. CTabCtrl class has a method called CTabCtrl::HighlightItem.
BOOL HighlightItem(
int idItem,
BOOL fHighlight = TRUE
);Hope this will be sufficient for you...:)
Happy christmas friends. May the Love of My Lord and Saviour Jesus bring forth Joy and Happiness into your life too. --Owner Drawn --Nothing special --Defeat is temporary but surrender is permanent --Never say quits --Jesus is Lord
-
You can do that in the OnSetActive() method... Also take a look at the GetTabControl() method of the CPropertySheet Class. It returns a reference to a particular CTabCtrl object. CTabCtrl class has a method called CTabCtrl::HighlightItem.
BOOL HighlightItem(
int idItem,
BOOL fHighlight = TRUE
);Hope this will be sufficient for you...:)
Happy christmas friends. May the Love of My Lord and Saviour Jesus bring forth Joy and Happiness into your life too. --Owner Drawn --Nothing special --Defeat is temporary but surrender is permanent --Never say quits --Jesus is Lord
Thanks, I want to re-modify my question. When we select the property sheet page tabs, then the selected page tab text should change the color of page tab text or highlight the tab text. Error is comming from the fallowing snippet that is, Error : " 'CPropertySheet::GetTabControl' : illegal call of non-static member function" How to access the GetTabContol() from CPropertyPage derived class?
BEGIN_MESSAGE_MAP(CPage2, CPropertyPage) //{{AFX_MSG_MAP(CPage2) // NOTE: the ClassWizard will add message map macros here //}}AFX_MSG_MAP END_MESSAGE_MAP() BOOL CPage2::OnSetActive() { CTabCtrl *pTabCtrl = CPropertySheet::GetTabControl(); TC_ITEM item; item.mask = TCIF_TEXT; item.pszText = "New Label"; pTabCtrl->SetItem (1, &item ); // CTabCtrl::HighlightItem(1, TRUE); return CPropertyPage::OnSetActive(); }
wating for you reply, - Ramesh.