Up | Example 01 - ComboBox | Example 02 - ListBox | Example 03 - Labels class derived from Winforms.Panel | Example 04 - Button with Resize Event | Example 05 - CheckBox | Example 06 - GroupBox | Example 07 - Modeless Status Dialog | Example 08 -Timer | Example 09 -TextBox | Example 10 - Custom Button Class | Example 11 - Product Selection ComboBox | Example 12 - Simple ListView

 

  

 
Example 01 - ComboBox

The following defines the creation of a ComboBox in a Panel or Form derived class.

# Create the comboBox
self.comboBox = WinForms.ComboBox()
self.comboBox.Parent = self
self.comboBox.Size = Size(100,100)
self.comboBox.Location = Point(100,90)
# add items
self.comboBox.Items.Add("3")
self.comboBox.Items.Add("4")
# set selection
self.comboBox.Text = "3"
self.comboBox.SelectedValueChanged += self.comboBox_SelectedValueChangedHandler

# eventhandler
def comboBox_SelectedValueChangedHandler(self, sender, args):
   print self.comboBox.Text

 

 

Scorpion Vision Version XII : Build 646 - Date: 20170225
Scorpion Vision Software® is a registered trademark of Tordivel AS.
Copyright © 2000 - 2017 Tordivel AS.