Print Page | Close Window

Mask in FlatEdit control

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: General Discussion
Forum Description: Topics Related to Active-X COM Development in General
URL: http://forum.codejock.com/forum_posts.asp?TID=17950
Printed Date: 14 May 2024 at 2:14pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Mask in FlatEdit control
Posted By: DataCrypt
Subject: Mask in FlatEdit control
Date Posted: 23 February 2011 at 6:48pm
CodeJock Support,

I'm in the process of evaluating your CodeJock Xtreme Suite controls and have a couple of questions regarding the FlatEdit control.  I would like to use (purchase) these controls to use on an older Visual Basic 6 application.  That application uses MaskEdit controls quite a bit and I was trying to replace it with the FlatEdit control.  This requires me to use the SetMask method of the FlatEdit, which is fine, but I have no way of "retrieving" the mask that has been set.

Is there a property or something that will give me the mask that has been set (i.e. FlatEdit1.GetMask)?  If not, would you please consider adding something like this to your control?

Also, when I do set a mask with the default prompt character (an underscore "_") to something like FlatEdit1.SetMask "000-0000", "___-____" (to hold some formatted number with a dash), I seem to have some issues retrieving the data entered from the control.  For example, if not all values are required, and the user enters "123-12" and I output FlatEdit1.Text or FlatEdit1.MaskedText, I get "123-12__".  I am getting the prompt characters in my value.  I want/need the actual data and NOT include the prompt.  What am I doing wrong here?  Not sure if this is a feature or a bug, but it would be nice to request the data in the control without the mask (pure data).

Thank you very much for your time,

DataCrypt



Replies:
Posted By: Oleg
Date Posted: 24 February 2011 at 1:22am
Hi,

MaskedText should return it without '-'  when user will enter all characters.

if you allow only part of text you can set such mask
FlatEdit1.SetMask "000-0000", "   -    ", " "


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: DataCrypt
Date Posted: 24 February 2011 at 12:24pm
Yes, you are correct - I made a mistake in my original post - it does return it without the "-", but it does return the unfilled prompt character locations.  I don't think it should do that.

So if the mask is "000-0000", "___-____" and the user enters "000-12", MaskedText property should return "00012" and not "0012__".  I think this makes much more sense.  Is there any possibility of the MaskedText changing to return just the data not return the prompt character?

I will try your example mask you provided, but I notice you are not using a prompt char which I would like to display to the user so they can better see what is expected to be entered.

Thank you very much,

DataCrypt


Posted By: DataCrypt
Date Posted: 20 April 2011 at 9:20am
Hi oleg.  Have you verified this?  I was wondering if this fix would be available in the next release.  Thank you.

Best Regards,

DataCrypt


Posted By: Oleg
Date Posted: 21 April 2011 at 1:00am
Hello,

Sorry, I don't see something to fix. Its designed behavior.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: DataCrypt
Date Posted: 22 April 2011 at 9:14am
oleg,

In the MaskEdit if not all values are required, and the user enters "123-12" (for a Mask set as "000-0000", "___-____") and I output the MaskedText, I get "123-12__".  Basically it's outputting the prompt characters in my return value.

How can this be a good design?  I need the actual data NOT including the prompt character.  It would be much better to return the text without the mask (pure data) for the MaskedText property. Currently I'm having to go an extra step and manually strip the prompt character!!  This should not be necessary.  The only time I get the pure data and without containing the prompt character is if the text completely fills the mask.

Please re-evaluate this and let me know your thoughts.  Thank you.

Best Regards,

DataCrypt



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net