Sets at runtime the control's image list.
Type | Description | |||
Handle as Variant |
The Handle parameter can be:
|
The following VB sample replaces the entire list of icons ( if it was loaded at design time ), using a Microsoft Image List control ( ImageList1 ):
ComboBox1.Images ImageList1.hImageList
The following VB sample initializes the Images collection using BASE64 encoded string:
Private Sub ComboBox1_InsertItem(ByVal Item As EXCOMBOBOXLibCtl.HITEM) With ComboBox1.Items .CellImage(Item, 0) = 1 + .ItemToIndex(Item) Mod 3 End With End Sub Private Sub Form_Load() With ComboBox1 .BeginUpdate .Images "gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwkbiAAQGJqrAxgAxjAsOHws7w+Pib/x2Ny2JQFNy2fzWNqmH0kPy8u02TjOW0uY0GQ1+IxVA2O1xutsWp1WG02s3uizsZ4Ox2mijW2yG43FAyW8zOQlG6jPL03NvW+zGV4Gr7fPnuWjfg4+h5Omzmn5XSmvW0/RzEb8/n9Pvu/Y73ayHn8HD40687wv6+7qwGzD4sU5aZwQjTdODBcCNO/8Hrw/D0N+2DusQ7j8tmmbNw5DTZM6+z5QfCicQVCEDtTEsHxI+i7PnCrsws7ziQ68kQpQ+zcQMzsUJhGL4NnFkZvfIkcrxEbFR7HLcRsnTkQhB0itO8SbSC3adw9H0jsPJkTKHGMGwbH7KS7M8XyzF0ZSbFsVTSpEYyspMYvZLKVxRJ0cKxMqnT7O9AUDQVBriiwfJXQ6PJAkSSAAkqUUfE71UI9aKPefh/nnTJ3oyeAfnAf54GejJwAecFPgfUgDmBU1HnBVYBmBVwDkAANZNXWgA1q1aDAHXbHV7R1eEAA9hWBV5AA/UgBnxUwf06AZ/AefFngAfIHn+T5/D+6dLIygIA=" .ColumnAutoResize = True .HeaderVisible = False .Columns.Add "Column 1" .PutItems Array("Item 1", "Item 2", "Item 3") .EndUpdate End With End Sub
The following C++ sample initializes the Images collection using BASE64 encoded string:
#include "Items.h" #include "Columns.h" #include "Column.h" m_combobox.BeginUpdate(); CString s = "gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBnqAQEZwmCxFhYGLib"; s += "/xoAw9ZiFdxbAAGVxM5yOTzkPy+MzGRpmdx2kl2epGY1WgxmZl+Yyery2yyGHyeirGoo+03mM02Jzee029y2Ewum2+FnOTlGezHNx0b3/C3U258a4mP5HVvOw52s2fg2vH6ml8uf8OWmnMjXs9vRjXG8fa88068Z+/o/XJ8nm/zHrg4L/ti8TQts87svyljfuk+DlPfAbPPkicAJnCbs"; s += "NbDDLO2xz5PlBi3O8x0EsZD7zuG8T1vrCD5uZE7zxM+CXQNB78RKw8RRbF8Rwyu0UPS/UYsfBSbw4lEJx3AEkwvGbxSY/clsPIT3L600pxhHECx6lsjLA7LbxZH7XJfK0Dwi/8iNPJMjSo0clvjMLuTHLkJTNCqVTSms2Tkq8jTzOcVP/BsePUocQLDQ9AJ3LtFUbR1HqaiwfJXSaPJA"; s += "kSSAAkqUU2nE20gmp5oo6JwH+eZ31EjJwB+eBn1K/AHnBWIfvwAZwACYAHsMy9cIMyFeEBTrIADYKSWLX1ipLXxgJLYgDoyeDIA+cFngAfwAVWfFdIcAB8B+f1tn+YJ/D+f5Poyf5xoojKAg"; m_combobox.Images( COleVariant( s ) ); m_combobox.GetColumns().Add( "Column 1" ); COleVariant vtMissing; V_VT( &vtMissing ) = VT_ERROR; CItems items = m_combobox.GetItems(); long h = items.AddItem( COleVariant( "Item 1" ) ); items.SetCellImage( COleVariant( h ), COleVariant( (long) 0 ), 1 ); h = items.AddItem( COleVariant( "Item 2" ) ); items.SetCellImages( COleVariant( h ), COleVariant( (long) 0 ), COleVariant( "2,3" ) ); m_combobox.EndUpdate();
The following VB.NET sample initializes the Images collection using BASE64 encoded string:
Dim s As String With AxComboBox1 .BeginUpdate() s = "gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBnqAQEZwmCxFhYGLib/xoAw9ZiFdxbAAGVxM5yOTzkPy+MzGRpmdx2kl2epGY1WgxmZl+Yyery2yyGHyeirGoo+03mM02Jzee029y2Ewum2+FnOTlGezHNx0b3/C3U258a4mP5HVvOw52s2fg2vH6ml8uf8OWmnMjXs9vRjXG8fa88068Z+/o/XJ8nm/zHrg4L/ti8TQts87svyljfuk+DlPfAbPPkicAJnCbsNbDDLO2xz5PlBi3O8x0EsZD7zuG8T1vrCD5uZE7zxM+CXQNB78RKw8RRbF8Rwyu0UPS/UYsfBSbw4lEJx3AEkwvGbxSY/clsPIT3L600pxhHECx6lsjLA7LbxZH7XJfK0Dwi/8iNPJMjSo0clvjMLuTHLkJTNCqVTSms2Tkq8jTzOcVP/BsePUocQLDQ9AJ3LtFUbR1HqaiwfJXSaPJAkSSAAkqUU2nE20gmp5oo6JwH+eZ31EjJwB+eBn1K/AHnBWIfvwAZwACYAHsMy9cIMyFeEBTrIADYKSWLX1ipLXxgJLYgDoyeDIA+cFngAfwAVWfFdIcAB8B+f1tn+YJ/D+f5" s = s + "Poyf5xoojKAg" .Images(s) .Columns.Add("Column 1") With .Items Dim h As Integer h = .AddItem("Item 1") .CellImage(h, 0) = 1 h = .AddItem("Item 2") .CellImages(h, 0) = "2,3" End With .EndUpdate() End With
The following C# sample initializes the Images collection using BASE64 encoded string:
axComboBox1.BeginUpdate(); string s = "gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBnqAQEZwmCxFhYGLib/xoAw9ZiFdxbAAGVxM5yOTzkPy+MzGRpmdx2kl2epGY1WgxmZl+Yyery2yyGHyeirGoo+03mM02Jzee029y2Ewum2+FnOTlGezHNx0b3/C3U258a4mP5HVvOw52s2fg2vH6ml8uf8OWmnMjXs9vRjXG8fa88068Z+/o/XJ8nm/zHrg4L/ti8TQts87svyljfuk+DlPfAbPPkicAJnCbsNbDDLO2xz5PlBi3O8x0EsZD7zuG8T1vrCD5uZE7zxM+CXQNB78RKw8RRbF8Rwyu0UPS/UYsfBSbw4lEJx3AEkwvGbxSY/clsPIT3L600pxhHECx6lsjLA7LbxZH7XJfK0Dwi/8iNPJMjSo0clvjMLuTHLkJTNCqVTSms2Tkq8jTzOcVP/BsePUocQLDQ9AJ3LtFUbR1HqaiwfJXSaPJAkSSAAkqUU2nE20gmp5oo6JwH+eZ31EjJwB+eBn1K/AHnBWIfvwAZwACYAHsMy9cIMyFeEBTrIADYKSWLX1ipLXxgJLYgDoyeDIA+cFngAfwAVWfFdIcAB8B+f1tn+YJ/D+f5"; s = s + "Poyf5xoojKAg"; axComboBox1.Images(s); axComboBox1.Columns.Add("Column 1"); int h = axComboBox1.Items.AddItem("Item 1"); axComboBox1.Items.set_CellImage(h, 0, 1); h = axComboBox1.Items.AddItem("Item 2"); axComboBox1.Items.set_CellImages(h, 0, "2,3"); axComboBox1.EndUpdate();
The following VFP sample initializes the Images collection using BASE64 encoded string:
local s With thisform.ComboBox1 .BeginUpdate() s = "gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrl" s = s + "dr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBnqAQEZwmCxFhYGLib/xoAw9ZiFdxbAAGVxM5yOTzkPy+MzGRpmdx2kl2epGY1WgxmZl+Yyery2yyGHyeir" s = s + "Goo+03mM02Jzee029y2Ewum2+FnOTlGezHNx0b3/C3U258a4mP5HVvOw52s2fg2vH6ml8uf8OWmnMjXs9vRjXG8fa88068Z+/o/XJ8nm/zHrg4L/ti8TQts87svyljfuk+DlPfAbPP" s = s + "kicAJnCbsNbDDLO2xz5PlBi3O8x0EsZD7zuG8T1vrCD5uZE7zxM+CXQNB78RKw8RRbF8Rwyu0UPS/UYsfBSbw4lEJx3AEkwvGbxSY/clsPIT3L600pxhHECx6lsjLA7LbxZH7XJfK0D" s = s + "wi/8iNPJMjSo0clvjMLuTHLkJTNCqVTSms2Tkq8jTzOcVP/BsePUocQLDQ9AJ3LtFUbR1HqaiwfJXSaPJAkSSAAkqUU2nE20gmp5oo6JwH+eZ31EjJwB+eBn1K/AHnBWIfvwAZwACYAHsMy9cIMyFeEBTrIADYKSWLX1ipLXxgJLYgDoyeDIA+cFngAfwAVWfFdIcAB8B+f1tn+YJ/D+f5" s = s + "Poyf5xoojKAg" .Images(s) .Columns.Add("Column 1") With .Items .DefaultItem = .AddItem("Item 1") .CellImage(0, 0) = 1 .DefaultItem = .AddItem("Item 2") .CellImages(0, 0) = "2,3" EndWith .EndUpdate() EndWith