slloyd has asked for the wisdom of the Perl Monks concerning the following question:

I am using the Win32::Gui to create a window interface to a form but I cannot seem to get ENTER keys to work in Textfield boxes when I have dialogui set. I want to be able to have tabbing enabled on all but my multiline textfields.

I set the following in my main window to enable tabstops on the rest of the texfields and buttons: $Window->{-dialogui}=1; When this is set, the ENTER key no longer works in my multiline textfield boxes.

Is there a way to tell a textfield to allow ENTER keys to work when the dialogui option is set?
  • Comment on Win32::GUI and Enter Keys in a textfield

Replies are listed 'Best First'.
Re: Win32::GUI and Enter Keys in a textfield
by jplindstrom (Monsignor) on Mar 06, 2004 at 13:42 UTC
    In the Textfield control, try adding a ES_WANTRETURN option

    AddTextfield( ... -addstyle => 0x1000, #ES_WANTRETURN ... );

    There may be a named option in a recent version of Win32::GUI, or maybe a symbol for ES_WANTRETURN.

    If you use The GUI Loft, there is a property called WantReturn for doing this.

    /J

      Thanks a bunch.. You totally rock! That worked perfectly.