![]() |
CXTPControlComboBox with images ? |
Post Reply
|
| Author | |
lion
Groupie
Joined: 04 March 2008 Status: Offline Points: 22 |
Post Options
Thanks(0)
Quote Reply
Topic: CXTPControlComboBox with images ?Posted: 28 October 2008 at 6:06am |
|
Hi
is there a ComboBox that supports icons for every entry ? cu B |
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 28 October 2008 at 10:59am |
|
Hi,
You need SetListIconId method.
|
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
lion
Groupie
Joined: 04 March 2008 Status: Offline Points: 22 |
Post Options
Thanks(0)
Quote Reply
Posted: 29 October 2008 at 4:25am |
|
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 |
Post Options
Thanks(0)
Quote Reply
Posted: 01 December 2008 at 3:43am |
|
Hi,
it still did not seem to work. What could be wrong? Cheers B |
|
![]() |
|
mgampi
Senior Member
Joined: 14 July 2003 Status: Offline Points: 1210 |
Post Options
Thanks(0)
Quote Reply
Posted: 23 January 2009 at 9:00am |
|
Hello Björn;
have you ever solved this; otherwise does anyone know how to solve it? |
|
|
Martin Product: Xtreme Toolkit v 22.1.0, new Projects v 24.0.0 Platform: Windows 10 v 22H2 (64bit) Language: VC++ 2022 |
|
![]() |
|
mgampi
Senior Member
Joined: 14 July 2003 Status: Offline Points: 1210 |
Post Options
Thanks(0)
Quote Reply
Posted: 23 January 2009 at 9:31am |
|
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 22.1.0, new Projects v 24.0.0 Platform: Windows 10 v 22H2 (64bit) Language: VC++ 2022 |
|
![]() |
|
foxars
Newbie
Joined: 27 January 2009 Status: Offline Points: 1 |
Post Options
Thanks(0)
Quote Reply
Posted: 27 January 2009 at 7:59pm |
|
Hi,
Please tell me how did you do with SetListIconId ??!! Thanks |
|
![]() |
|
mgampi
Senior Member
Joined: 14 July 2003 Status: Offline Points: 1210 |
Post Options
Thanks(0)
Quote Reply
Posted: 11 February 2009 at 3:40pm |
|
Hi;
Try this:
|
|
|
Martin Product: Xtreme Toolkit v 22.1.0, new Projects v 24.0.0 Platform: Windows 10 v 22H2 (64bit) Language: VC++ 2022 |
|
![]() |
|
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 |