Icon Disabled Issue |
Post Reply |
Author | |
pmessdev
Newbie Joined: 02 May 2024 Status: Offline Points: 2 |
Post Options
Thanks(0)
Posted: 02 May 2024 at 1:36pm |
Hi, I'm encountering some issues trying to disable buttons in the ribbon. The result I'm getting is that the text beneath the icon appears to be disabled, but the icon itself doesn't gray out. We also tried using a disabled icon, but it didn't work. Additionally, we tried with the two simplified functions below. With the first one, we get the aforementioned result, while with the call below, the same thing happens, but additionally, when hovering over it, the highlight color flickers. void AClass::DisableButton(CCmdUI* pCmdUI) { pCmdUI->Enable(FALSE); } void AClass::DisableButton(CCmdUI* pCmdUI) { CXTPControl* pControl = CXTPControl::FromUI(pCmdUI); pControl->SetEnabled(FALSE); } Thanks in advance for your help! PM
|
|
agontarenko
Admin Group Joined: 25 March 2016 Status: Offline Points: 286 |
Post Options
Thanks(0)
|
Hello,
Unfortunately it is not clear what exactly is going wrong. Can you please provide more detailed information. If it cannot be re-produced in any of our sample applications provided I would appreciate you sending a sample application so that we could debug it. I've tested our RibbonSample and any problems not found. I changed RibbonSampleView.h and RibbonSampleView.cpp files with next code: RibbonSampleView.h void OnSimpleButtonCommand(); void OnUpdateSimpleButton(CCmdUI* pCmdUI); RibbonSampleView.cpp replace ON_COMMAND_RANGE(ID_BUTTONS_LARGE_SIMPLEBUTTON, ID_BUTTONS_LARGE_SPLITPOPUPBUTTON, OnEmptyCommand) with ON_COMMAND_RANGE(ID_BUTTONS_LARGE_POPUPBUTTON, ID_BUTTONS_LARGE_SPLITPOPUPBUTTON, OnEmptyCommand) add this lines: ON_UPDATE_COMMAND_UI(ID_BUTTONS_LARGE_SIMPLEBUTTON, OnUpdateSimpleButton) void CRibbonSampleView::OnUpdateSimpleButton(CCmdUI* pCmdUI) { pCmdUI->Enable(m_bToggleButton); } And result I attach in screenshot. Regards, Artem Gontarenko |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |