1. Edit Control
- Posted by bobspringett <bobspringett at WANADOO.FR> Sep 06, 2000
- 583 views
Could someone please advise me how to limit the number of characters entered in a one line EDIT CONTROL. Regards Bob
2. Re: Edit Control
- Posted by Brian Broker <bkb at CNW.COM> Sep 07, 2000
- 520 views
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
3. 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
4. Edit Control
- Posted by Euman <euman at bellsouth.net> Jan 11, 2002
- 502 views
Hello all, I need some help understanding Edit Controls. Specifically how you setup a GUI to react to keys and the exit method. Not everyone uses a mouse on their machine so how would you go about setting focus to another control. You have to maintain a TAB-key in the editor and an ENTER key is out of the question. I do know how to trap certain keys and send a message to the subclassed from the subclass "sending the message to itself", I do it like this. elsif iMsg = WM_KEYDOWN then if wParam = VK_BACK then junk = c_func(xPeekMessage,{tagMSG, c_func(xGetParent,{handle}), 0, 0, PM_REMOVE}) junk = SendMessage(handle, WM_CHAR, wParam, MAKELONG(1, 14)) --send it to ourself this traps the BACK-BUTTON in the edit control and sends a WM_CHAR message which I could inturn process further. Pretty easy stuff, right.. What key would I need to use? this will save me some time looking. TIA, Euman
5. Re: Edit Control
- Posted by Euman <euman at bellsouth.net> Jan 12, 2002
- 512 views
My guess too was CTRL-TAB but wasnt sure if there might be another variation that people use. Thanks dude, Euman ----- Original Message ----- From: <bensler at mail.com> > > I'm mostly just guessing, but it seems to me that edit ctrls use > CTRL-TAB to tab to the next ctrl. At least I have seen this method b4. > I think in most cases, edit controls simply don't support tab spacing. > > Chris