CXTPControlComboBox on CommandBar stays disabled |
Post Reply |
Author | |
Thanos
Newbie Joined: 21 October 2010 Status: Offline Points: 2 |
Post Options
Thanks(0)
Posted: 21 October 2010 at 4:52am |
Hi,
i seem to have the following problem. I've created a CXTPommandBar on a CXTPDialogBase derived class like in the DialogSample like this:
VERIFY(InitCommandBars());
CXTPCommandBars* pCommandBars = GetCommandBars(); CXTPToolBar* pToolBar = pCommandBars->Add(_T("Planning"), xtpBarTop); pToolBar->LoadToolBar(IDR_PLANVIEW_TOOLBAR); pToolBar->ShowExpandButton(FALSE); pToolBar->GetControls()->CreateOriginalControls();
On the commandbar i've created a CXTPControlComboBox by using the following code in the OnCreateControl of the CXTPDialogBase derived class: m_pFilterCombo = new CXTPControlComboBox(GetCommandBars());lpCreateControl->pControl = m_pFilterCombo; m_pFilterCombo->SetWidth(140); m_pFilterCombo->SetHeight(200); m_pFilterCombo->SetDropDownListStyle(FALSE); m_pFilterCombo->SetEnabled(TRUE); The combobox shows up perfectly and i can access it in code, it just never seems to be set to enabled. I've tried addingON_UPDATE_COMMAND_UI and ON_XTP_EXECUTE handlers to the CXTPDialogBase derived class and to the mainframe and main program view but nothing seems to work, even if i use pCmdUI->SetEnable(TRUE) on any of those levels. One more thing to note would be that the CXTPDialogBase derived class is created and added to a pane that's added to the DockingPaneManager in the CMainFrame.
Any help on the subject would be appreciated.
Thanks in advance
|
|
If you can't beat them. Burn them.
|
|
Thanos
Newbie Joined: 21 October 2010 Status: Offline Points: 2 |
Post Options
Thanks(0)
|
Well for some reason it works now. I've readded the
ON_UPDATE_COMMAND_UI and ON_XTP_EXECUTE handlers to the CXTPDialogBase derived class and now the combobox is enabled. The only difference i can think of are the pToolBar->GetControls()->CreateOriginalControls(); andm_pFilterCombo->SetEnabled(TRUE); lines since the last time i tried this. |
|
If you can't beat them. Burn them.
|
|
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 |