20/09/2013, 15:27
|
| | Fecha de Ingreso: septiembre-2013
Mensajes: 6
Antigüedad: 11 años, 2 meses Puntos: 0 | |
Respuesta: SharpDevelop TextBox Duda Y ahora que tal? Cita: 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._textBox2 = System.Windows.Forms.TextBox()
self._label1 = System.Windows.Forms.Label()
self._label2 = System.Windows.Forms.Label()
self._textBox3 = System.Windows.Forms.TextBox()
self._label3 = System.Windows.Forms.Label()
self._label4 = System.Windows.Forms.Label()
self.SuspendLayout()
#
# button1
#
self._button1.Location = System.Drawing.Point(202, 253)
self._button1.Name = "button1"
self._button1.Size = System.Drawing.Size(75, 23)
self._button1.TabIndex = 0
self._button1.Text = "Aceptar"
self._button1.UseVisualStyleBackColor = True
self._button1.Click += self.Button1Click
#
# textBox1
#
self._textBox1.Location = System.Drawing.Point(300, 82)
self._textBox1.Name = "textBox1"
self._textBox1.Size = System.Drawing.Size(100, 20)
self._textBox1.TabIndex = 1
#
# textBox2
#
self._textBox2.Location = System.Drawing.Point(300, 145)
self._textBox2.Name = "textBox2"
self._textBox2.Size = System.Drawing.Size(100, 20)
self._textBox2.TabIndex = 2
#
# label1
#
self._label1.Font = System.Drawing.Font("Microsoft Sans Serif", 9.75, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, 0)
self._label1.Location = System.Drawing.Point(62, 83)
self._label1.Name = "label1"
self._label1.Size = System.Drawing.Size(202, 23)
self._label1.TabIndex = 3
self._label1.Text = "Introduce el primer numero:"
self._label1.Click += self.Label1Click
#
# label2
#
self._label2.Font = System.Drawing.Font("Microsoft Sans Serif", 9.75, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, 0)
self._label2.Location = System.Drawing.Point(62, 146)
self._label2.Name = "label2"
self._label2.Size = System.Drawing.Size(215, 23)
self._label2.TabIndex = 4
self._label2.Text = "Introduce el segundo numero:"
#
# textBox3
#
self._textBox3.Location = System.Drawing.Point(300, 201)
self._textBox3.Name = "textBox3"
self._textBox3.Size = System.Drawing.Size(100, 20)
self._textBox3.TabIndex = 5
#
# label3
#
self._label3.Font = System.Drawing.Font("Microsoft Sans Serif", 9.75, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, 0)
self._label3.Location = System.Drawing.Point(62, 202)
self._label3.Name = "label3"
self._label3.Size = System.Drawing.Size(202, 23)
self._label3.TabIndex = 6
self._label3.Text = "El resultado de la suma es:"
#
# label4
#
self._label4.Font = System.Drawing.Font("Impact", 20.25, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, 0)
self._label4.Location = System.Drawing.Point(62, 9)
self._label4.Name = "label4"
self._label4.Size = System.Drawing.Size(338, 44)
self._label4.TabIndex = 7
self._label4.Text = "CALCULADORA SUMATORIA"
self._label4.Click += self.Label4Click
#
# MainForm
#
self.ClientSize = System.Drawing.Size(462, 288)
self.Controls.Add(self._label4)
self.Controls.Add(self._label3)
self.Controls.Add(self._textBox3)
self.Controls.Add(self._label2)
self.Controls.Add(self._label1)
self.Controls.Add(self._textBox2)
self.Controls.Add(self._textBox1)
self.Controls.Add(self._button1)
self.Name = "MainForm"
self.Text = "mi ventanana"
self.Load += self.MainFormLoad
self.ResumeLayout(False)
self.PerformLayout()
def MainFormLoad(self, sender, e):
pass
def Button1Click(self, sender, e):
self._textBox3.Text = self._textBox1.Text + self._textBox2.Text
pass Precisamente en el Button1Click del evento no obtengo la respuesta adeacuada, sino una concatenación... |