# Help me with Method Entry of Gtk

**URL:** <https://www.ruby-forum.com/t/help-me-with-method-entry-of-gtk/226558>\
**Category:** Ruby\
**Created:** [December 16, 2012, 6:54am UTC](https://www.ruby-forum.com/t/help-me-with-method-entry-of-gtk/226558 "2012-12-16T06:54:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![soyoh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/a698b9/32.png) [@soyoh](https://www.ruby-forum.com/u/soyoh)\
**Post date:** [December 16, 2012, 6:54am UTC](https://www.ruby-forum.com/t/help-me-with-method-entry-of-gtk/226558/1 "2012-12-16T06:54:10Z")

</div>

I’m a Ruby N. trying to do a App, where user log on, when the users  
will write their password only show \*, I’ve been used invisible\_char but  
when compiled it, I shows a error

set\_invisible\_char’: wrong number of arguments (0 for 1) (ArgumentError)

I was missing an Argument but I don’t what it is, the rest of code is  
this

entrypassword = Gtk::Entry.new  
entrypassword.set\_invisible\_char

Thank you for Attention

---

<div class="post-metadata">

**Author:** ![soyoh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/a698b9/32.png) [@soyoh](https://www.ruby-forum.com/u/soyoh)\
**Post date:** [December 16, 2012, 7:07am UTC](https://www.ruby-forum.com/t/help-me-with-method-entry-of-gtk/226558/2 "2012-12-16T07:07:41Z")

</div>

On Dec 15, 2012, at 9:54 PM, Alejandro H. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> entrypassword.set\_invisible\_char
> 
> Thank you for Attention

Google: ruby Gtk set\_invisible\_char

One of the early hits:  
[http://ruby-gnome2.sourceforge.jp/ja/hiki.cgi?Gtk%3A%3AEntry](http://ruby-gnome2.sourceforge.jp/ja/hiki.cgi?Gtk%3A%3AEntry)

And from there:  
[http://ruby-gnome2.sourceforge.jp/ja/hiki.cgi?Gtk%3A%3AEntry#set\_invisible\_char](http://ruby-gnome2.sourceforge.jp/ja/hiki.cgi?Gtk%3A%3AEntry#set_invisible_char)

set\_invisible\_char(ch)  
Same as Gtk::Entry#invisible\_char=  
ch: a Unicode character(Number)  
Returns: self

invisible\_char=(ch)  
Sets the character to use in place of the actual text when  
Gtk::Entry#visibility= has been called to set text visibility to false.  
i.e. this is the character used in “password mode” to show the user how  
many characters have been typed. The default invisible char is an  
asterisk (‘\*’). If you set the invisible char to 0, then the user will  
get no feedback at all; there will be no text on the screen as they  
type.  
ch: a Unicode character(Number)  
Returns: ch

Not that hard, is it?

---

<div class="post-metadata">

**Author:** ![soyoh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/a698b9/32.png) [@soyoh](https://www.ruby-forum.com/u/soyoh)\
**Post date:** [December 16, 2012, 7:58am UTC](https://www.ruby-forum.com/t/help-me-with-method-entry-of-gtk/226558/3 "2012-12-16T07:58:51Z")

</div>

Thank you, Gennady B.

the correct code is this

entrypassword = Gtk::Entry.new  
entrypassword.set\_visibility(false)

Thank you very much
