Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > python gtk: input box and "enter"

Reply
Thread Tools

python gtk: input box and "enter"

 
 
edgue
Guest
Posts: n/a
 
      12-23-2009
Hello there,

I am somewhat fluent in python ... good enough for the daily business
scripting stuff. I have a little script that I use to start the afs
service
on my machine and to collect tokens for multiple afs cells.

I want to enter the password using a GUI window (stdin
in a terminal window is too easy to miss) ... and I found
an "input_box" example for python gtk here:

http://learnfobia.com/category-Compu...thon-1935.html

Problem is: this example lets me enter some text ... but when I press
'Enter' ... nothing happens. I have to move the focues to the OK
button;
either by clicking with the mouse or by pressing TAB.

The message box example from that page works as expected - I press
enter and such a window goes away.

I played around a bit .... couldnt find the setting that would help.
Can you help? How do I use gtk to enter a (hidden) text press
ENTER ... done?

regards,
eg
 
Reply With Quote
 
 
 
 
Nobody
Guest
Posts: n/a
 
      12-23-2009
On Tue, 22 Dec 2009 23:41:31 -0800, edgue wrote:

> How do I use gtk to enter a (hidden) text press ENTER ... done?


Connect the gtk.Entry's "activate" signal to the click() method:

self.entry.connect("activate", self.click)

 
Reply With Quote
 
 
 
 
edgue
Guest
Posts: n/a
 
      12-23-2009
On Dec 23, 12:33*pm, Nobody <(E-Mail Removed)> wrote:

> self.entry.connect("activate", self.click)


Does the job.

Thank you very much!

 
Reply With Quote
 
 
 
Reply

Thread Tools

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
div box questions; float text around a box, fit box to image size Gnarlodious HTML 4 05-05-2010 11:30 AM
How can I make an input box remember an input ? samir.doshi@gmail.com HTML 1 05-30-2006 08:25 AM
Width of text input box vs. password input box cjl HTML 1 10-31-2005 11:46 AM
Off Topic: Width of text input box vs. password input box cjl Javascript 7 10-30-2005 10:11 PM
hide the input box or change the color of input box in html ashutosh Java 3 06-16-2005 02:21 PM



Advertisments