Print Page | Close Window

CXTPControlComboBox - SetEnabled question

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=1394
Printed Date: 06 March 2025 at 4:15am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: CXTPControlComboBox - SetEnabled question
Posted By: krulle
Subject: CXTPControlComboBox - SetEnabled question
Date Posted: 10 November 2004 at 7:22am

Why is SetEnabled in CXTPControlComboBox a protected method?

In my case, I have a CXTPToolBar in a CDialog derived class. I want to manually disable it from the dialog code using a CXTPControlComboBox pointer like this:

m_ModeList->SetEnabled(FALSE);

I can't do this since SetEnabled is protected in the CXTPControlComboBox class. A "workaround" is to cast the pointer to a CXTPControlPopup pointer and call the public version of SetEnabled there but such code doesn't look good even if it works in this case.

((CXTPControlPopup*)m_ModeList)->SetEnabled(FALSE);

Is there a better way to disable a CXTPControlComboBox (without using update handler)?




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