You are not logged in. You can browse in the PowerBASIC Community, but you must click Login (top right) before you can post. If this is your first visit, check out the FAQ or Sign Up.
How can I limit the # of entries in a one line text box. I would like the limit to correspond to the attached data base. PBWin 80 &/or PBForms
Would like a beep when over the stated limit.
Control Add TextBox, hDlg, %TXT_TEXTBOX1, "Textbox1", .....
Control Send hDlg, %TXT_TEXTBOX1, %EM_SETLIMITTEXT, MAX_LEN&, 0
Limits user input to MAX_LEN& characters and sounds 'Default Beep' if user tries to enter more.
(In the example above 'Textbox1' would be included in the limit unless deleted.
The limit does not apply to programatically entered text e.g.
Control Set Text hWnd, %TXT_TEXTBOX1, "Some string greater in length than MAX_LEN&" 'would be accepted).
Last edited by Dave Biggs; 17 Sep 2008, 07:15 PM.
Reason: caveat
We process personal data about users of our site, through the use of cookies and other technologies, to deliver our services, and to analyze site activity. For additional details, refer to our Privacy Policy.
By clicking "I AGREE" below, you agree to our Privacy Policy and our personal data processing and cookie practices as described therein. You also acknowledge that this forum may be hosted outside your country and you consent to the collection, storage, and processing of your data in the country where this forum is hosted.
Comment