Print Page | Close Window

Combo Box With Icons

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=2168
Printed Date: 08 November 2025 at 2:54am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Combo Box With Icons
Posted By: Maneesh
Subject: Combo Box With Icons
Date Posted: 02 May 2005 at 7:51am

Hello

How can i create a combobox as a toolbar item and have items with an ICON and its Name like

<Excel Icon> Microsoft Excel

<OPen Icon> Open File

as Drop Down items.

Using xtreme toolkit pro !




Replies:
Posted By: Oleg
Date Posted: 06 May 2005 at 1:06am
Sorry, but we plan to implement Icons from ComboBox only for 10.0 release.

-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: Maneesh
Date Posted: 14 May 2005 at 3:52am

Well oleg Iam sorry .... I was able to do it !!! with Xtreme Toolkit pro !

I am not sure whether u understood the problem ~~

well hers the code !

Assume the toolbar button id is IDM_COMBO_SOURCE__BTN and in the OnCreateControl check for this !!!

CXTComboBoxEx m_SourceCombo;

 if (  pToolBar && pToolBar->GetBarID() == IDR_STANDARD_TOOLBAR )
 {
  //-- CREATING THE SOURCE COMBO BOX ITEM
  if ( lpCreateControl->nID == IDM_COMBO_SOURCE__BTN )
  {
   m_SourceCombo.Create( CBS_DROPDOWNLIST|WS_TABSTOP | WS_CHILD | WS_VISIBLE  , CRect( 0 ,0 , 200, 100) , this , ID_SOURCE_COMBOBOXITEM );
   
   CXTPControlCustom* pControlComboBox = CXTPControlCustom::CreateControlCustom(&m_SourceCombo);
   lpCreateControl->pControl = pControlComboBox;

}

 

Then use the InsertItem() fn to of teh combo box classs  to add the items in the combo and u can also set icons or bitmaps to each item !!!

 

Thanks

Maneesh




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net