From: Eric H. <eh...@co...> - 2005-10-27 16:47:26
|
I am experiencing something strange in 1.02 release with textfields not=20 Exhibiting the WANTRETURN behavior in DialogBoxes, but the do in Windows.=20 The RichEdit control WANTRETURN works with DialogBoxes as shown in the Code below. I have to change to a Window to allow the textfield to exhibit The WANTRETURN behavior. The textfield code below was mostly borrowed From the NotePad.pl DEMO script. =20 # $W2 =3D new Win32::GUI::DialogBox ($W1, $W2 =3D new Win32::GUI::Window ($W1, -title =3D> "Second Window", -name =3D> "Window2", -menu =3D> $M, -left =3D> 13,=20 -top =3D> 113,=20 -width =3D> 980,=20 -height =3D> 570, -style =3D> ws_sysmenu,=20 ); =20 $TF_MyText =3D $W2->AddTextfield( -name =3D> "TF_MyText", -pos =3D> [100,128], -size =3D> [300,73], -font =3D> $EditFont, -multiline =3D> 1, -hscroll =3D> 1, -vscroll =3D> 1, -autohscroll =3D> 1, -autovscroll =3D> 1, -keepselection =3D> 1, -background =3D> [196,192,153], ); =20 # $RE_MyText =3D $W2->AddRichEdit( # -name =3D> "RE_MyText", # -top =3D> 205, # -left =3D> 100, # -height =3D> 96, # -width =3D> 300, # -font =3D> $EditFont, # -style =3D> WS_VISIBLE | WS_VSCROLL | ES_MULTILINE | ES_WANTRETURN, # );=20 # $RE_Mytext->SetBkgndColor([196,192,153]); =20 =20 =20 Eric Hansen =20 |