Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
4
Erster Beitrag:
vor 1 Jahr, 11 Monaten
Letzter Beitrag:
vor 1 Jahr, 11 Monaten
Beteiligte Autoren:
Curtis, Mike H, Fabrice Harari

[WD20] Input Mask Problem [SOLVED]

Startbeitrag von Curtis am 07.03.2016 23:26

I have an edit field that is numeric. The display mask is set to "Same mask as the input". The input mask is set to "99.9 %%". This mask works fine. However, if the user toggles a different control I change the input mask using the maskSystemCurrency constant.

EDT_NoName1..InputMask = maskSystemCurrency

That also works fine, but if the user toggles the control again I switch the input mask back to "99.9 %%".

EDT_NoName1..InputMask = "99.9 %%"

At this point the edit field starts displaying as 9,9 % instead of 99% and it will not let me include a decimal place.

Thoughts?

Antworten:

Re: [WD20] Input Mask Problem

Hi Curtis

I generally don't change input masks so I don't have any direct answer. However, there is an easy work around, by using two input fields with different masks and making visible the one you need.

Best regards

von Fabrice Harari - am 08.03.2016 11:55

Re: [WD20] Input Mask Problem

Hi Curtis

Here's what I tried to address your problem.

1. Define a string variable MyMask to store the original mask.

2. BEFORE EDT_NoName1..InputMask = maskSystemCurrency
I inserted: MyMask=EDT_NoName1..InputMask

3. Then INSTEAD OF EDT_NoName1..InputMask = "99.9 %%"
I used EDT_NoName1..InputMask = MyMask

It seems to work fine.

- Mike H.

von Mike H - am 08.03.2016 13:40

Re: [WD20] Input Mask Problem

Two good work arounds. Thanks guys. I went ahead and used the MyMask variable and it stored the initial input mask as "99,9 %%" and worked when I set the edit field's input mask to MyMask. Comma's and periods get confusing when dealing with masks.

von Curtis - am 08.03.2016 14:51
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.