TwwEdit MaskEdit
Hi.
With wwEdit1 do begin
MaxInputLength = 4;
ValidationOptions.AllowInvalidExit = true;
ValidationOptions.AsYouType = false;
ValidationOptions.ValidationFeedback = wwfNone;
ValidationPictureMask.AutoFill = true;
ValidationPictureMask.ErrorMessage = '';
ValidationPictureMask.PictureMask = '##.#';
End;
Without datawhere = ok.
With datawhere the mask do not work. he decimalseparator does not appear.
Thanks.
-
I implemented a custom keyboard. How to insert a character in TwwEdit when the button is pressed, respecting the mask?
procedure TForm_covas.btnNum1Click(Sender: TObject);
var v: String;
begin
if (screen.FocusControl is TwwEdit) and (not TwwEdit(screen.FocusControl).ReadOnly) then begin
TwwEdit(screen.FocusControl).BeginUpdate;
if TwwEdit(screen.FocusControl).SelLength = TwwEdit(screen.FocusControl).Text.Length then
v := TwwButton(Sender).Text
else begin
v := TwwEdit(screen.FocusControl).Text;
v := v + TwwButton(Sender).Text;
end;
TwwEdit(screen.FocusControl).text := v;
TwwEdit(screen.FocusControl).EndUpdate;
if v.Length >= TwwEdit(screen.FocusControl).MaxInputLength then
acNextControl.Execute
end
end;
Please sign in to leave a comment.
Comments
2 comments