From: Hidetoshi NAGAI Date: 2005-06-23T12:37:56+09:00 Subject: Re: TkEntry problem to echo TkEntry value From: sujeet kumar Subject: TkEntry problem to echo TkEntry value Date: Thu, 23 Jun 2005 01:13:31 +0900 Message-ID: <734fb92405062209137e4bc0e7@mail.gmail.com> > 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. Please read man pages of Tcl/Tk. :-) For example, the manual of "entry" describes -------------------------------------------------------------- Command-Line Name:-show Database Name: show Database Class: Show If this option is specified, then the true contents of the entry are not displayed in the window. Instead, each character in the entry's value will be displayed as the first character in the value of this option, such as ``*''. This is useful, for example, if the entry is to be used to enter a password. If characters in the entry are selected and copied elsewhere, the information copied will be what is displayed, not the true contents of the entry. -------------------------------------------------------------- If you want to use this option on Ruby/Tk, you have to use "show" option which is a name removed the head '-' of "Command-Line Name". For example, e = TkEntry.new(f, :show=>'x') or e = TkEntry.new(f, 'show'=>'x') e.show('*') e[:show] = '-' or e['show'] = '-' e.configure(:show=>'o') or e.configure('show'=>'o') and so on. -- Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)