Re: field size

new topic     » goto parent     » topic index » view thread      » older message » newer message

how in the world would you have found this. The Win32lib.doc shows the
sendMessage with several arguments but no detail at all. is their some other
doc what would go into more detail?

..george

----- Original Message -----
From: <irvm at ellijay.com>
To: "EUforum" <EUforum at topica.com>
Subject: Re: field size


> >
>
> On Thursday 26 July 2001 13:31, gwalters at sc.rr.com wrote:
>
> > Can someone tell me how to control the number of chars that can be
entered
> > in a field? Now the entered items continue to scroll. (i.e. for the
state i
> > would only allow 2chars to be entered)
> >
> > ...george
> >
>
> Here's a clip from Brian Broker in the archives:
>
> 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
>
>
> >
> >
> >

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu