I think you have to set a property on the Entry widget to hide the text - similiar to -show => '*' for Perl/Tk (Entry widget). This code might make it so that the characters being typed are not visible.

$entry->set_visibility ($visibility);

Where $visibility is a boolean value.

Here's some info from http://www.gnome.org/~james/pygtk-docs/class-gtkentry.html - a page on gtk.

gtk.Entry.set_invisible_char instance.set_invisible_char(ch); ch a Unicode character Sets the character to use in place of the actual text when gtk.En +try.set_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 wi +ll get no feedback at all; there will be no text on the screen as the +y type.

I didn't see any Perl/gtk calls to set_invisible_char, but it doesn't mean it doesn't exist.


Rich36
There's more than one way to screw it up...


In reply to Re: Password widget for Gtk-Perl? by Rich36
in thread Password widget for Gtk-Perl? by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.