CGDevTools Forum

Welcome to the Official CGDevTools Support Community Forums.

How to use MaskOptions (the help file is useless)

by Craig Burke » 04 Aug 2016 14:42

XE2 - CGDev 2.0.0.3522

Does anyone know how to use the MaskOptions property correctly? The help file does not actually "help" on how to use any of the properties.
I need to limit input to numeric only, currency only and float. So I need 3 different masks. I do not want any literals or place holders.

The Help file that I have indicates that there is a CurrencyOptions property, however, it is not available in design time of the component.

Please keep in mind that I do not know Json, Java, etc... I don't use RegEx or MaskOptions in Delphi. So please provide simple code samples.

Thanks,
Craig
Craig Burke
 
Posts: 14
Joined: 29 Jul 2016 21:06

by Alexander Bulei » 04 Aug 2016 18:09

Hi Craig Burke,

CGDev 2.0.0.3522


You have very oldest version...
Anyway, you need use the definitions as mask, example:

Code: Select all
IWCGJQEdit1.MaskOptions.Mask:= '9999999';


From the jquery plugin documentation (Right Click -> Plugin Documentation), you have the default definitions:

a - Represents an alpha character (A-Z,a-z)
9 - Represents a numeric character (0-9)
* - Represents an alphanumeric character (A-Z,a-z,0-9)


Source: http://digitalbush.com/projects/masked-input-plugin/

But, there is one problem, this plugin accept only the exact number of characters as in mask.
Due this problem, we have implemented another plugin (MaskOptionsEx)...

The Help file that I have indicates that there is a CurrencyOptions property, however, it is not available in design time of the component.


Because you have old version.

Best Regards.
Group: Developers | Support Team

  • info [at] cgdevtools.com - General information
  • sales [at] cgdevtools.com - Sales department
  • support [at] cgdevtools.com - Product and Technical Support
User avatar
Alexander Bulei
Site Admin
 
Posts: 3637
Joined: 15 May 2012 08:52
Location: Mealhada, Portugal

by Craig Burke » 05 Aug 2016 00:37

Hi Alexander,

I am using delphi func DupeChar to replicate '99999' based on the size of the field.

When I used :
MaskOptions.Mask := '9999'
MaskOptions.Enabled := True

it shows the ____ which we don't want.
So I used MaskOptions.PlaceHolder := ' '
That removes the ____ but when you try to clear the content by controlname.text := '' when the PlaceHolder is set to a single space it only clears the content back to the previous entry. (The fields are used to create an SQL statement so if it does not satisfy the user they can keep trying and one way is to use a reset button that clears all fields out to default)

Also, if you don't use (in this example) a 4 digit number the control clears on exit.

I am using the IW 12.2.31 controls. What is the most current version that you have that is compatible and will solve the issues I am having with Integer and Currency?

Thanks,
Craig
Craig Burke
 
Posts: 14
Joined: 29 Jul 2016 21:06

by Alexander Bulei » 08 Aug 2016 10:55

Hi Craig Burke,

Yes, about this limitations i was talking...

Due this problem, we have implemented another plugin (MaskOptionsEx)...


Best Regards.
Group: Developers | Support Team

  • info [at] cgdevtools.com - General information
  • sales [at] cgdevtools.com - Sales department
  • support [at] cgdevtools.com - Product and Technical Support
User avatar
Alexander Bulei
Site Admin
 
Posts: 3637
Joined: 15 May 2012 08:52
Location: Mealhada, Portugal

by Craig Burke » 08 Aug 2016 15:30

Hi Alexander,

Can you answer please?

I am using the IW 12.2.31 controls. What is the most current version that you have that is compatible and will solve the issues I am having with Integer and Currency?

Thanks,
Craig
Craig Burke
 
Posts: 14
Joined: 29 Jul 2016 21:06

by Alexander Bulei » 09 Aug 2016 15:57

Hi,

It was added since 2.9.0.206

Best Regards.
Group: Developers | Support Team

  • info [at] cgdevtools.com - General information
  • sales [at] cgdevtools.com - Sales department
  • support [at] cgdevtools.com - Product and Technical Support
User avatar
Alexander Bulei
Site Admin
 
Posts: 3637
Joined: 15 May 2012 08:52
Location: Mealhada, Portugal


Return to JQEdit

Who is online

Users browsing this forum: No registered users and 4 guests

Contact Us.