A combo box can be useful when creating a form for users such as an on-line order form. The new GcComboBox cell in Spread for Windows Forms allows you to set different backcolors for each list item. The GcComboBox also has a resize icon that allows you to resize the drop-down list. Both the GcComboBox cell and the original Spread combo box cell allow you to add images to the drop-down list. The GcComboBox cell can display the image in the edit area with the TextBoxStyle property. The following example creates a simple form that displays a price when you select from a list of dessert flavors. GcComboBox Cell Selected Item Use the following steps to create this example:
Add images to an image list.
Create the GcComboBox cell.
Set cell properties and add the list items.
Set colors and images for the list items. Assign the image list to the cell.
Set any cell formatting properties.
Assign the cell type to the cell location.
Add the currency cell.
Add text information and set the font and alignment.
Use the ComboSelChange event to get the selection and set the price.
Here is the complete example in C#:
Here is the complete example in VB:
The following help topic has information about adding the Spread component to a Visual Studio project: http://sphelp.grapecity.com/WebHelp/SpreadNet10/WF/webframe.html#spwin-vs2015add.html. For more information about the GcComboBox cell, refer to http://sphelp.grapecity.com/WebHelp/SpreadNet10/WF/webframe.html#spwin-gccombo.html.