[EMAIL PROTECTED] wrote: > hi all > If does not add on "$Win->{'-dialogui'}=1",then "-tapstop=>1" cannot use,
Please don't access the object's hash directly like this, it might stop working at some stage. Please use the constructor's -dialogui option, the Change() method, or the DialogUI() method. The following all achieve the same thing: my $win = Win32::GUI::Window->new( ... -dialogui => 1, ... ); $win->Change(-dialogui => 1); $win->DialogUI(1); > but if adds on "$Win->{'-dialogui'}=1", > then "$Win->AddTextfield(-multiline=>1, ...)" has been invalid, > in Textfield cannot knock the Enter.... Setting DialogUI(1) on a top level window makes it behave as a 'standard' windows dialog, where the <ENTER> key is mapped to the default behaviour (usually the 'OK' button). If you want a multi-line textfield to be able to have <Enter> make a new-line, then you need to add the ES_WANTRETURN style to the textfield. There is no Win32::GUI::Textfield support of this directly (although there probably should be). The following will do what you want: use Win32::GUI qw(ES_WANTRETURN); my $win = Win32::GUI::Window->new( ... ); $win->AddTextfield( ... -addstyle => ES_WANTRETURN, ); Regards, Rob. -- Robert May Win32::GUI, a perl extension for native Win32 applications http://perl-win32-gui.sourceforge.net/