Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - CXTPControlComboBox - SetEnabled question
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

CXTPControlComboBox - SetEnabled question

 Post Reply Post Reply
Author
Message
krulle View Drop Down
Newbie
Newbie


Joined: 05 October 2004
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote krulle Quote  Post ReplyReply Direct Link To This Post Topic: CXTPControlComboBox - SetEnabled question
    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)?

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.156 seconds.