Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Inputmask in Combobox
Message
From
17/10/2006 14:55:19
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
17/10/2006 14:20:16
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01162659
Message ID:
01162673
Views:
15
>I want to use inputmask in a combobox with inputmask '9-99-999-99999', and also want to restrict user to enter the data using same inputmask.
>
>cb1.format = "ZKR"
>cb1.inputmask= "9-99-999-99999"
>
>What I get from setting these properties. When user enters the data it is OK. But the data in list is not changed by inputmask.

As it should not be. Inputmask applies to the textbox part of the combo. If you want all of it to show transformed...

>Now what I did to solve this problem I used transform() in the SELECT statement to show data in required inputmask.
>It changed the data, but when user enters the data in combobox it shows the additional "-" due to "-" presence in data.
>How would I acheive the solution?

...you'd then get it transformed twice when selected. The only way out of this that I see is to fill the combo with transformed data (i.e. with dashes inserted) and when saving into a table have it transformed back (with dashes removed).

The "R" in the format means that it would display but not store the formatting. And the dropdown part shows them as they are to be stored.

You may try to have two columns in the combo - the visible one with formatted strings, and the invisible one (this.columwidths=transform(this.width)+",0") with unformatted, bound to second column.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform