Gtk.Entry.prototype.set_width_chars

function set_width_chars(n_chars:Number):void {
    // Gjs wrapper for gtk_entry_set_width_chars()
}

Changes the size request of the entry to be about the right size for n_chars characters. Note that it changes the size <emphasis>request</emphasis>, the size can still be affected by how you pack the widget into containers. If n_chars is -1, the size reverts to the default entry size.

n_chars

width in chars