1
1
Fork 0
mirror of https://github.com/FellippeHeitor/InForm.git synced 2025-01-15 11:59:34 +00:00

Fixes #42: restore Mask field property box and improves behavior.

This commit is contained in:
FellippeHeitor 2018-05-10 23:08:44 -03:00
parent 15793320a3
commit 74fc7e697c
2 changed files with 7 additions and 1 deletions

View file

@ -1113,6 +1113,11 @@ SUB __UI_BeforeUpdateDisplay
Text(TextTB) = Replace(PreviewTexts(FirstSelected), CHR$(13), "\n", False, 0) Text(TextTB) = Replace(PreviewTexts(FirstSelected), CHR$(13), "\n", False, 0)
ELSE ELSE
Text(TextTB) = PreviewTexts(FirstSelected) Text(TextTB) = PreviewTexts(FirstSelected)
IF LEN(PreviewMasks(FirstSelected)) > 0 AND PreviewControls(FirstSelected).Type = __UI_Type_TextBox THEN
Mask(TextTB) = PreviewMasks(FirstSelected)
ELSE
Mask(TextTB) = ""
END IF
END IF END IF
IF (__UI_Focus = TextTB AND RevertEdit = True) THEN RevertEdit = False: SelectPropertyFully __UI_Focus IF (__UI_Focus = TextTB AND RevertEdit = True) THEN RevertEdit = False: SelectPropertyFully __UI_Focus
ELSEIF __UI_Focus = TextTB THEN ELSEIF __UI_Focus = TextTB THEN
@ -1461,7 +1466,7 @@ SUB __UI_BeforeUpdateDisplay
Control(PasswordMaskCB).Disabled = False Control(PasswordMaskCB).Disabled = False
FOR i = 1 TO UBOUND(InputBox) FOR i = 1 TO UBOUND(InputBox)
SELECT CASE InputBox(i).ID SELECT CASE InputBox(i).ID
CASE ValueTB, MinTB, IntervalTB, PaddingTB, MaskTB, AlignOptions, VAlignOptions, MinIntervalTB CASE ValueTB, MinTB, IntervalTB, PaddingTB, AlignOptions, VAlignOptions, MinIntervalTB
Control(InputBox(i).ID).Disabled = True Control(InputBox(i).ID).Disabled = True
CASE ELSE CASE ELSE
Control(InputBox(i).ID).Disabled = False Control(InputBox(i).ID).Disabled = False

View file

@ -844,6 +844,7 @@ SUB __UI_BeforeUpdateDisplay
FOR i = 1 TO UBOUND(Control) FOR i = 1 TO UBOUND(Control)
IF Control(i).ControlIsSelected THEN IF Control(i).ControlIsSelected THEN
Mask(i) = b$ Mask(i) = b$
Text(i) = ""
END IF END IF
NEXT NEXT
CASE 36 'MinInterval CASE 36 'MinInterval