Re: Edit Control
- Posted by bobspringett <bobspringett at WANADOO.FR> Sep 08, 2000
- 513 views
Thanks Brian and Wolf. Regards Bob ----- Original Message ----- From: Brian Broker <bkb at CNW.COM> To: <EUPHORIA at LISTSERV.MUOHIO.EDU> Sent: Thursday, September 07, 2000 11:37 PM Subject: Re: Edit Control > On Wed, 6 Sep 2000 18:10:41 +0200, bobspringett wrote: > > >Could someone please advise me how to limit the number of characters > entered in a one line EDIT CONTROL. > >Regards > >Bob > > Use SendMessage( ControlID, EM_LIMITTEXT, limit_number, NULL ) > > where 'limit_number' is your limit. > > Example: > > include win32lib.ew > > constant > Win = create( Window, "limit", 0, Default, Default, 200, 100, 0 ), > Box = create( EditText, "", Win, 10, 10, 180, 20, 0 ) > > procedure onOpen_Win() > atom nil > -- limit of 10 characters in Box -- > nil = sendMessage( Box, EM_LIMITTEXT, 10, NULL ) > end procedure > onOpen[Win] = routine_id( "onOpen_Win" ) > > WinMain( Win, Normal ) > > -- Brian