![]() |
CXTPControlComboBox with images ? |
Post Reply ![]() |
Author | |
lion ![]() Groupie ![]() Joined: 04 March 2008 Status: Offline Points: 22 |
![]() ![]() ![]() ![]() ![]() Posted: 28 October 2008 at 6:06am |
Hi
is there a ComboBox that supports icons for every entry ? cu B |
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hi,
You need SetListIconId method.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
lion ![]() Groupie ![]() Joined: 04 March 2008 Status: Offline Points: 22 |
![]() ![]() ![]() ![]() ![]() |
Hi,
thanx for your help. i tried doing that in the ComandBarControls Example in the file MainFrm.cpp but it did not show any effect. I just inserted it after creating a new icon around line number 111: CXTPToolBar* pToolBarCombo = pCommandBars->Add(_T("Combo"), xtpBarTop); pToolBarCombo->SetBarID(IDR_MAINFRAME + 3); pToolBarCombo->GetControls()->Add(xtpControlLabel, 0)->SetCaption(_T("CXTPControlComboBox:")); pToolBarCombo->GetControls()->Add(xtpControlComboBox, ID_FILE_NEW); CXTPControlComboBox* pControlCombo = (CXTPControlComboBox*)pToolBarCombo->GetControls()->Add(xtpControlComboBox, ID_FILE_NEW); pControlCombo->AddString("asdf1"); pControlCombo->AddString("asdf2"); pControlCombo->AddString("asdf3"); pControlCombo->AddString("asdf4"); pControlCombo->SetDropDownListStyle(); DockRightOf(pToolBarCombo, pToolBarPopups); pControlCombo->SetListIconId(IDI_ICON1); and pControlCombo->IsImageVisible(); returns false. the thing I want to achieve is that I have an Icon/Image per Item in the list: ![]() we have several such controls to choose patterns etc. how do i do this with an CXTPControlComboBox ? I would appreciate your help very much. Thanx. Cheers Björn |
|
![]() |
|
lion ![]() Groupie ![]() Joined: 04 March 2008 Status: Offline Points: 22 |
![]() ![]() ![]() ![]() ![]() |
Hi,
it still did not seem to work. What could be wrong? Cheers B |
|
![]() |
|
mgampi ![]() Senior Member ![]() ![]() Joined: 14 July 2003 Status: Offline Points: 1198 |
![]() ![]() ![]() ![]() ![]() |
Hello Björn;
have you ever solved this; otherwise does anyone know how to solve it? |
|
Martin
Product: Xtreme Toolkit v 19.0.0, new Projects v 19.1.0 Platform: Windows 10 v 1909 (64bit) Language: VC++ 2017 |
|
![]() |
|
mgampi ![]() Senior Member ![]() ![]() Joined: 14 July 2003 Status: Offline Points: 1198 |
![]() ![]() ![]() ![]() ![]() |
Hi;
I solved it by myself. Using SetListIconId did it, but the order of calling SetListIconId and AddString is important! BTW: if I set SetDropDownListStyle(FALSE), why is the icon of the selected listbox item not automatically set in the edit control? Should be improved! ![]() |
|
Martin
Product: Xtreme Toolkit v 19.0.0, new Projects v 19.1.0 Platform: Windows 10 v 1909 (64bit) Language: VC++ 2017 |
|
![]() |
|
foxars ![]() Newbie ![]() Joined: 27 January 2009 Status: Offline Points: 1 |
![]() ![]() ![]() ![]() ![]() |
Hi,
Please tell me how did you do with SetListIconId ??!! Thanks |
|
![]() |
|
mgampi ![]() Senior Member ![]() ![]() Joined: 14 July 2003 Status: Offline Points: 1198 |
![]() ![]() ![]() ![]() ![]() |
Hi;
Try this:
|
|
Martin
Product: Xtreme Toolkit v 19.0.0, new Projects v 19.1.0 Platform: Windows 10 v 1909 (64bit) Language: VC++ 2017 |
|
![]() |
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 |