Hello Dynos,
I did some copy/paste stuff. I want to create a windo with hyperlinks. Later on to create some layout stuff, but step by step:
1.) how can i change the default height/length
2.) how can i create a hyperlink
is there something like self.Hyperlink.Text
?
3.) how can say button.click = close.window
import sys
sys.path.append(r'C:\Python24\Lib')
import clr
clr.AddReference("System.Drawing")
clr.AddReference("System.Windows.Forms")
from System.Drawing import Point
from System.Windows.Forms import Application, Button, Form, Label
class Intro(Form):
def __init__(self):
self.Text = 'Visuelles Programmieren bei XXX'
self.label = Label()
self.label.Text = "https://forum.dynamobim.com/"
self.label.Location = Point(50, 50)
self.label.Height = 30
self.label.Width = 1200
self.count = 0
button = Button()
button.Text = "OK"
button.Location = Point(50, 100)
button.Click += self.buttonPressed
self.Controls.Add(self.label)
self.Controls.Add(button)
def buttonPressed(self, sender, args):
print 'The label *used to say* : %s' % self.label.Text
self.count += 1
self.label.Text = "You have clicked me %s times." % self.count
form = Intro()
Application.Run(form)
(the def buttonPressed is from the tutorial. - it is useless, but when i delete i got an error)
I am glad about any info
KR
Andreas