LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 04-14-2005, 03:17 PM   #1
Hal
Member
 
Registered: Oct 2003
Location: East Anglia, England
Distribution: Dapper Drake / Slackware
Posts: 151

Rep: Reputation: 30
wxPython GUI input/output simple question


Hey there,

I'm getting started with wxPython, and am using the Boa Constructor IDE.

I have got a console program full of Python defs that I can slot in. However I'm a bit stuck as to how to get user information from my input wxTextCtrl box, to my
Code:
    def OnCalculateAreaButton(self, event):
event.Skip()
(that only has the skip() method in it currently, it will change)

Then write the output off to an output wx.TextCtrl box.

I used a frontend to wxPython called "Python Card" and that offered a very simple way of setting input/output in text boxes. Some sample code here:

Code:
    def on_incrBtn_mouseClick(self, event):
        startValue = int(self.components.field1.text)
        endValue = startValue + 1
        self.components.field1.text = str(endValue)
        
    def on_decrBtn_mouseClick(self, event):
        startValue = int(self.components.field1.text)
        endValue = startValue - 1
        self.components.field1.text = str(endValue)
        
    def on_resetBtn_mouseClick(self, event):
        self.components.field1.text = "0"
I really just want something in wxPython to work like self.components.field1.text = str(endValue)
to show "endValue" in a text box.

I'm using wxPython mainly because Python Card doesn't play well when being frozen to a binary. wxPython doesn't object at all, so I'd really like to get it working .

If you need any more information, or a screenshot or source code to explain more then just ask -- Cheers!

to GUI programming I'm afraid.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Input / output error xviddivxoggmp3 Slackware 22 08-24-2004 12:47 PM
Redirect script output to log window in wxPython wapcaplet Programming 1 07-04-2004 08:59 PM
Input/Output error Toker Linux - Newbie 4 10-01-2003 02:11 PM
Simple GUI Question noelcantona Programming 2 09-24-2003 10:18 AM
please help, simple question about redirect output kool Linux - General 4 03-18-2002 09:34 AM


All times are GMT -5. The time now is 02:27 AM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration