Advertisement
Dmitry_Dronov

combo

Jan 25th, 2016
265
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.98 KB | None | 0 0
  1. # http://scripterr.ru/
  2. #
  3. import System
  4. from System import *
  5. import clr
  6. bool = IN[0]
  7. inlist = IN[1]
  8. clr.AddReference("System.Windows.Forms")
  9. clr.AddReference("System.Drawing")
  10. clr.AddReference("System.Configuration")
  11. clr.AddReference("System.Data")
  12. clr.AddReference("System.ComponentModel")
  13. #from System.Configuration import *
  14. #from System.Windows.Forms import Application, Form
  15. #from System.Windows.Forms import Button, ComboBox, DomainUpDown, TextBox, ListBox
  16. #from System.Drawing import Point, Size
  17.  
  18.  
  19. class MainForm(System.Windows.Forms.Form):
  20.  
  21.     def __init__(self):
  22.         self.InitializeComponent()
  23.    
  24.     def InitializeComponent(self):
  25.         self._button1 = System.Windows.Forms.Button()
  26.         self._comboBox1 = System.Windows.Forms.ComboBox()
  27.         self.SuspendLayout()
  28.         #
  29.         # button1
  30.         #
  31.         self._button1.DialogResult = System.Windows.Forms.DialogResult.OK
  32.         self._button1.Location = System.Drawing.Point(12, 282)
  33.         self._button1.Name = "button1"
  34.         self._button1.Size = System.Drawing.Size(534, 23)
  35.         self._button1.TabIndex = 3
  36.         self._button1.Text = "OK"
  37.         self._button1.UseVisualStyleBackColor = True
  38.         #
  39.         # comboBox1
  40.         #
  41.         self._comboBox1.FormattingEnabled = True
  42.         self._comboBox1.Items.AddRange(System.Array[System.Object](inlist))
  43.         self._comboBox1.Location = System.Drawing.Point(12, 12)
  44.         self._comboBox1.Name = "comboBox1"
  45.         self._comboBox1.Size = System.Drawing.Size(260, 21)
  46.         self._comboBox1.TabIndex = 4
  47.         #
  48.         # MainForm
  49.         #
  50.         self.AccessibleName = ""
  51.         self.ClientSize = System.Drawing.Size(558, 317)
  52.         self.Controls.Add(self._comboBox1)
  53.         self.Controls.Add(self._button1)
  54.         self.Name = "MainForm"
  55.         self.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
  56.         self.Text = "Script#8.4.Marking of wall hole"
  57.         self.ResumeLayout(False)
  58.  
  59.  
  60.     def GroupBox1Enter(self, sender, e):
  61.         pass
  62.  
  63.     def Label1Click(self, sender, e):
  64.         pass
  65.        
  66.    
  67. ## FOOTER ###
  68.  
  69. dialog = MainForm()
  70. dialog.ShowDialog()
  71.  
  72. OUT = dialog._comboBox1.SelectedItem
  73. ## FOOTER ###
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement