App GUI integration (FarPy)

Reply

Join Date: Nov 2006
Posts: 66
Reputation: Racoon200 is an unknown quantity at this point 
Solved Threads: 1
Racoon200's Avatar
Racoon200 Racoon200 is offline Offline
Junior Poster in Training

App GUI integration (FarPy)

 
0
  #1
Nov 7th, 2007
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:
  1. def link(href,target,linkName):
  2. partA = "<a href='"+href+"' target='"+target+"'>"+linkName+"</a>"
  3. print partA

Now, this is the GUI (textbox) that I want to implement with that function:
  1. self.linkUrl = TextBox(Text='url', Location=Point(8,304), Size=Size(113, 20))
  2. self.linkUrl.BackColor = Color.FromArgb(255, 255, 255)
  3. self.linkUrl.Font = Font('Microsoft Sans Serif', 8.25)
  4. self.linkUrl.Cursor = Cursors.Default
  5. self.Controls.Add(self.linkUrl)
And its triggering button...
  1. self.addLink = Button(Text='Add Link', Location=Point(7,328), Size=Size(288, 26))
  2. self.addLink.Font = Font('Microsoft Sans Serif', 8.25)
  3. self.addLink.Cursor = Cursors.Default
  4. 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.
Reply With Quote Quick reply to this message  
Join Date: Jul 2006
Posts: 608
Reputation: jrcagle is on a distinguished road 
Solved Threads: 150
jrcagle jrcagle is offline Offline
Practically a Master Poster

Re: App GUI integration (FarPy)

 
0
  #2
Nov 7th, 2007
I'm confused. Do you need to figure out how to get the text out of the textbox?

Also, what GUI toolkit are you using?

Jeff
Reply With Quote Quick reply to this message  
Join Date: Nov 2006
Posts: 66
Reputation: Racoon200 is an unknown quantity at this point 
Solved Threads: 1
Racoon200's Avatar
Racoon200 Racoon200 is offline Offline
Junior Poster in Training

Re: App GUI integration (FarPy)

 
0
  #3
Nov 7th, 2007
What I need is to get the content of the textbox with the click of the button.
I dont know what do you mean with the palette. All I know is that iam using FarPy GUI Editor
Last edited by Racoon200; Nov 7th, 2007 at 9:32 pm.
_______
woli
Reply With Quote Quick reply to this message  
Join Date: Jul 2006
Posts: 608
Reputation: jrcagle is on a distinguished road 
Solved Threads: 150
jrcagle jrcagle is offline Offline
Practically a Master Poster

Re: App GUI integration (FarPy)

 
0
  #4
Nov 7th, 2007
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
Reply With Quote Quick reply to this message  
Join Date: Nov 2006
Posts: 66
Reputation: Racoon200 is an unknown quantity at this point 
Solved Threads: 1
Racoon200's Avatar
Racoon200 Racoon200 is offline Offline
Junior Poster in Training

Re: App GUI integration (FarPy)

 
0
  #5
Nov 16th, 2007
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
_______
woli
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC