PlanetSquires Forums

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: CMaskedEdit  (Read 73 times)

Paul Squires

  • Administrator
  • Master Member
  • *****
  • Posts: 8613
  • Windows 10
    • PlanetSquires Software
CMaskedEdit
« on: November 01, 2018, 02:05:08 PM »

I have the new MaskedEdit control integrated into WinFBE but I am/was a little confused about the SetText documentation.

bSetMaskedCharsOnly Set the masked characters only, without the input mask.

Unless I am interpreting the documentation incorrectly, setting bSetMaskedCharsOnly to TRUE means that you would pass a string using only the mask characters without the input mask (eg. "5551119999"). If set to FALSE then you would also pass the Input Mask (eg. "(555) 111-9999").

However, in operation the logic appears to work the exact opposite. In order to work, SetText("5551119999", FALSE) or SetText("(555) 111-9999", TRUE).

Am I right? Wrong? Documentation error?

Logged
Paul Squires
PlanetSquires Software
FireFly Visual Designer, WinFBE Editor

José Roca

  • Moderator
  • Master Member
  • *****
  • Posts: 3103
    • Jos
Re: CMaskedEdit
« Reply #1 on: November 01, 2018, 03:09:44 PM »

Well, my poor attempt was to mean that in

pMskEd.EnableMask(" ddd  ddd dddd", "(___) ___-____", "_")
pMskEd.SetText("(123) 123-1212"), TRUE

where " ddd  ddd dddd" are the masked characters and "(___) ___-____" the input mask, passing true to that parameter will cause to set only the numbers (the masked characters) without the () and -, that correspond to the input mask.

But because there is a "mask" and "masked characters", I don't know how to explain it better.

With the EnableMask method, both the masked characters and the input mask are mandatory, and must be the same length.
« Last Edit: November 01, 2018, 03:14:34 PM by José Roca »
Logged