Up | .Net 1.1 with Scorpion Examples | Winforms Controls Samples

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
 

  

 
Winforms Controls Samples

In this section we will provide you with small examples for creation and usage of WinForms Controls in OverlayPanel derived class:

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

All the examples are based on adding control/gui elements to a WinForms.Panel or WinForms.Form derived class.

To connect .Net to Scorpion a Python class derived from Tordivel.OverlayPanel or Tordivel.OwnedForm is defined.


Example 1: Central Start Import List

To use the Tordivel.OverlayPanel the following modules needs to be imported - often placed in the Central.Start Script.

import CLR
import CLR.System.Windows.Forms as WinForms
from CLR.System.Drawing import Size, Point
# Profile specific DotNet components should be placed in DotNet folder in profile path
# OverlayPanel and OwnedForm are distributed with Scorpion in the Scorpion Directory

Assembly.LoadWithPartialName("OverlayPanel")
from CLR.Tordivel import OverlayPanel
class StatusPanel(OverlayPanel):
def __init__(self,nativeParentHandleAsInt32):

Example 2: Connect the StatusPanel derived from OverlayPanel to a Scorpion Windows Handle

statusPanel = StatusPanel(GetCustomPage('Status').handle)

 

 


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