| | |
App GUI integration (FarPy)
![]() |
Hi. Iam making an app to write and append to an html document blog-type blocks. I have the GUI finished, but I need to fusion it with my script.
Look at this snippet of my script:
Now, this is the GUI (textbox) that I want to implement with that function:
And its triggering button...
Now, I want to do that when the button is clicked this happens:
link([what is in the textbox],x,y)
Thats all i need.
Look at this snippet of my script:
Python Syntax (Toggle Plain Text)
def link(href,target,linkName): partA = "<a href='"+href+"' target='"+target+"'>"+linkName+"</a>" print partA
Now, this is the GUI (textbox) that I want to implement with that function:
Python Syntax (Toggle Plain Text)
self.linkUrl = TextBox(Text='url', Location=Point(8,304), Size=Size(113, 20)) self.linkUrl.BackColor = Color.FromArgb(255, 255, 255) self.linkUrl.Font = Font('Microsoft Sans Serif', 8.25) self.linkUrl.Cursor = Cursors.Default self.Controls.Add(self.linkUrl)
Python Syntax (Toggle Plain Text)
self.addLink = Button(Text='Add Link', Location=Point(7,328), Size=Size(288, 26)) self.addLink.Font = Font('Microsoft Sans Serif', 8.25) self.addLink.Cursor = Cursors.Default self.Controls.Add(self.addLink)
Now, I want to do that when the button is clicked this happens:
link([what is in the textbox],x,y)
Thats all i need.
•
•
Join Date: Jul 2006
Posts: 608
Reputation:
Solved Threads: 150
Alright, I've Googled for documentation on FarPy and come up empty.
If you take any object and pass it to dir, it will give you a readout of the available methods and properties of that object. Try inserting
print dir(self.linkUrl) into your code and look for a method that looks like "getText" or something similar.
Jeff
If you take any object and pass it to dir, it will give you a readout of the available methods and properties of that object. Try inserting
print dir(self.linkUrl) into your code and look for a method that looks like "getText" or something similar.
Jeff
Well, I read something about wxPython and I guess you can do it by
(for a button)
self.buttonName.Bind(wx.EVT_BUTTON, self.buttonNameClick)
Where buttonName is the button's name, and buttonNameClick is a function that is triggered when the button is clicked.
Sorry for not specifying that I was exporting to wxPython. Perhaps that would've helped. 8P
(for a button)
self.buttonName.Bind(wx.EVT_BUTTON, self.buttonNameClick)
Where buttonName is the button's name, and buttonNameClick is a function that is triggered when the button is clicked.
Sorry for not specifying that I was exporting to wxPython. Perhaps that would've helped. 8P
_______
woli
woli
![]() |
Similar Threads
- Couple of questions (VB.NET)
- TouchPoint or (Java) and .NET App Integration (IT Professionals' Lounge)
- who can help me with GUI?? (Java)
- business online app/business graphic app (Java)
- advice on a gui app builder (Python)
- ?A Simple Win32 GUI Introduction Snippet? (C++)
- line up JTextField GUI java & write to file (Java)
- help much needed !! (OS X)
Other Threads in the Python Forum
- Previous Thread: wxPython Button Demo
- Next Thread: Help with Maya Tzolkin - Haab
| Thread Tools | Search this Thread |
address advanced aliased anydbm bash beginner bits calling casino changecolor clear command conversion convert corners count csv cturtle cursor curves definedlines dictionary digital dynamic dynamically events examples excel external file float format frange function gui handling hints homework i/o iframe import input java line linux list lists loan loop matching mouse multiple number numbers obexftp output parsing path port prime programming projects py py2exe pygame python random rational raw_input recursion recursive return scrolledtext searchingfile shebang signal singleton string strings tails terminal text threading time tkinter tlapse tooltip tuple tutorial type ubuntu unicode urllib urllib2 valueerror variable web-scrape whileloop word wxpython





