CXTPControlComboBox and Sorting |
Post Reply |
Author | |
precisionlaser
Newbie Joined: 29 September 2005 Status: Offline Points: 2 |
Post Options
Thanks(0)
Posted: 29 September 2005 at 7:52pm |
Does anyone know how to set the style for the CXTPControlComboBox so
that it automatically sorts the contents a la a real combo box? I
just spent over $700 on this library and have wasted over an hour
trying to figure out what ought to be a simple fix.
Mark |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Here fix: class CControlSortedComboBoxList : public CXTPControlComboBoxList virtual void CreateListBox() };
CControlSortedComboBox() m_pCommandBar = new CControlSortedComboBoxList(); ... IMPLEMENT_XTP_CONTROL(CControlSortedComboBox, CXTPControlComboBox) ...
Usage: CControlSortedComboBox* pComboFind = new CControlSortedComboBox; pComboFind->SetDropDownListStyle(); pComboFind->AddString(_T("Line1")); pComboFind->SetWidth(150); lpCreateControl->pControl = pComboFind;
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
precisionlaser
Newbie Joined: 29 September 2005 Status: Offline Points: 2 |
Post Options
Thanks(0)
|
Thank you, Oleg...I was afraid that was the only way to do this.
I ended up just adding the LBS_SORT style to the CXTPControlComobBox
class in the CreateListBox function and rebuilding. I almost
never use a combo box without auto sorting, so it's easier just to do
it this way and if I have to derive a new class without sorting, I'll
just do it then. Why not a SetSortStyle member function in the
future?
Mark |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Added for next, release. To prevent fixing your application for next release, I recommend change it back and to add: void ModifyListBoxStyle(DWORD dwRemove, DWORD dwAdd) void CXTPControlComboBox::ModifyListBoxStyle(DWORD dwRemove, DWORD dwAdd) pComboBoxList->DestroyWindow();
And to fix CreateListBox as void CXTPControlComboBoxList::CreateListBox() Usage:
CXTPControlComboBox* pComboFind = (CXTPControlComboBox*)CXTPControlComboBox::CreateObject(); pComboFind->SetDropDownListStyle(); pComboFind->AddString(_T("Line1")); |
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
csturg
Newbie Joined: 13 July 2005 Status: Offline Points: 12 |
Post Options
Thanks(0)
|
Any idea when a version will be released that contains this sorting change? Thanks, Craig |
|
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 |