Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How can I restrict TextBox values without using combo
Message
From
03/10/2001 11:42:43
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00563635
Message ID:
00563664
Views:
21
>>>>>Hi everybody,
>>>>>
>>>>>I could not find this info in Help on Format, though I remember, I saw it there. I have a field Status in a table, which could be either A or I (Active/Inactive). I don't want to use combobox for this, so I need to restict textbox values. I can do it in KeyPress event, but I want something simpler...
>>>>>
>>>>>Could you please help me?
>>>>>
>>>>>Thanks in advance.
>>>>
>>>>Put '@M' in the Format property and the list of values separated by commas into InputMask property
>>>
>>>Thanks, it works, however, I can not delete value. Also M Included for backward compatibility and not documented.
>>
>>If the only valid choices are "A" or "I", why would you need to delete the value?
>
>When I want to change from A to I, from user's point of view I have to delete "A" and type "I". However, I can not delete, I can only type "I", which is not 100% intuitive. Anyway, I can live with this.
>
>Also I tried to use KeyPress event already, but it didn't work.

Nadya,
User need not to delete 'Active' to input 'Inactive'. Pressing A and I works or even spacebar loops through availabale items. If you want to support deletion (empty value) then add a space to input values list :
Format = 'M'
Inputmask = ' ,Active,Inactive'

It says backward compatible but you know some backward compataible things have no current counterpart yet :)
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform