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 05 - CheckBox
The following defines the creation of a CheckBox in a Panel or Form derived class.
# Create the checkBox
self.checkBox = WinForms.CheckBox()
self.checkBox.Parent = self
self.checkBox.Size = Size(80,30)
self.checkBox.Location = Point(120,10)
self.checkBox.Text = "Enable"
self.checkBox.Checked = 1
# Register event handler for checkBox.CheckedChanged
self.checkBox.CheckedChanged += self.checkBox_CheckedChangedHandler
def checkBox_CheckedChangedHandler(self, sender, args):
  # Handles the checkBox CheckedChanged event

  if self.checkBox.Checked == 1:
    self.button.Enabled = 1
  elif self.checkBox.Checked == 0:
    self.button.Enabled = 0
 

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