Hello,
i read a small turtorial lesson after witch i started playing around a bit.
this was the code i addit to the main structure:
a = 1
b = textBox1
if ( b == a ):
print "AN"
else :
print "B"
The program had 1 textbox 1 button.The idee behind it was if i type 1 in the textbox and click button afterwords i should have recieve AN message.if i filled in nothing i should have recieved B message.
b = string that pases whatever is filled in in textbox to string b
i get an error cant read what it is/why is this not working?how can i communicate with the interface/design?
below you find the whole code
import System.Drawing
import System.Windows.Forms
from System.Drawing import *
from System.Windows.Forms import *
class MainForm(Form):
def __init__(self):
self.InitializeComponent()
def InitializeComponent(self):
self._button1 = System.Windows.Forms.Button()
self._textBox1 = System.Windows.Forms.TextBox()
self.SuspendLayout()
#
# button1
#
# textBox1
#
self._textBox1.Location = System.Drawing.Point(3, 12)
self._textBox1.Name = "textBox1"
self._textBox1.Size = System.Drawing.Size(100, 20)
self._textBox1.TabIndex = 1
#
self._button1.Location = System.Drawing.Point(208, 12)
self._button1.Name = "button1"
self._button1.Size = System.Drawing.Size(75, 23)
self._button1.TabIndex = 0
self._button1.Text = "button1"
self._button1.UseVisualStyleBackColor = True
a = 1
b = textBox1
if ( b == a ):
print "a"
else :
print "B"
#
# MainForm
#
self.ClientSize = System.Drawing.Size(284, 262)
self.Controls.Add(self._textBox1)
self.Controls.Add(self._button1)
self.Name = "MainForm"
self.Text = "Joker"
self.ResumeLayout(False)
self.PerformLayout()