[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

TkEntry problem to echo TkEntry value

sujeet kumar

6/22/2005 4:14:00 PM

Hi
I want to take some data( given by user from) from TkEntry . But I
also want data to be not seen by other. So i want whatever he types in
TkEntry, some echo character like " * " prints instead of original
letters. And program can use that data.
What should I do?
I tried to use "echo" function of Ruby gem's highline , it worked for
console input using "data = ask("Question ") { |q| q.echo = "*"}".
But i don't know how to use the same for TkEntry.

Is there any other approach? How to do this?

regards
sujeet


2 Answers

Markus Weihs

6/22/2005 8:16:00 PM

0

Hi!

Entries have the option "show":


require 'tk'

root = TkRoot.new
e = TkEntry.new(root) {
show '*'
pack
}
TkButton.new(root) {
text 'Ok'
command proc{p e.get()}
pack
}
Tk.mainloop()


Is this what you want?


Regards, Markus

Hidetoshi NAGAI

6/23/2005 3:38:00 AM

0