We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Use ImageIndexItem

Hi,
i try to set a ImageIndexItem to an ComboBoxAdv Item.

read at Manual i can use somethink like

myComboboxAdv.ItemsImageIndexes.Add(New Syncfusion.Windows.Forms.Tools.ComboBoxAdv.ImageIndexItem(myComboboxAdv, "ItemName", 0))

But this function add a 'new' entry.

unfortunately the myComboboxAdv.Items.add("ItemName") function Adds a ImageIndex-Entry also automatically 
So at MyComboBoxAdv.ImageIndexes are dublicate entrys for one Item and the Image would't shown.

how can i change the index of the Image that should be shown for a existing item?
Because i would like to change the image while runtime it is more interesting to change the image instead of set the correct index by item.add()

1 Reply

KJ Keerthana Jegannathan Syncfusion Team December 8, 2016 09:27 AM UTC

Hi Alexander,   
   
Thank you for contacting Syncfusion support.   
   
We suspect your requirement is to change the image index of the ComboBoxAdv item. If so, this requirement can be met by using the  “DrawItem” of the ListBox​​​. We have prepared a sample in which we have drawn the image for the ComboBox item based on the image index using “DrawItem” event and it can be downloaded from the below location.   
   
Sample: ComboBoxItemImageIndex   
   
Please let us know, if we misunderstood your query.   
   
Regards,   
Keerthana J.   


Loader.
Up arrow icon