SOLVED: PropertyGrid Setmask problems |
Post Reply |
Author | |
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
Posted: 04 April 2008 at 9:16am |
Hi,
I want to prevent the user to type some characters. The * and ?
Is it possible with Setmask ? Prefer a (working) sample how to do this.
Thank you very much!!
|
|
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2 Language: Visual Basic 6.0 Zero replies is not an option.... |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
Sorry no. Seems we need add regexp support for future :( Quite a lot of requests.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1354 |
Post Options
Thanks(0)
|
Hi Oleg,
Regex would be cool, but it might be easier to implement a BeforeEditInsert event that allows us to cancel any changes before they happen. This would allow us to easily allow/disallow keypresses for any reason. Something like
In the above example, any * characters about to be inserted into the item edit box would be removed, then if the text to be inserted was numeric, then the insertion would be completely cancelled. This is a nonsense example, but it illustrates two features: 1) Ability to modify the insertion text instead of cancel it completely 2) Ability to cancel the insertion of text completely. Maybe not as powerful as regex support, but it should be easier to implement as an interim solution (NOTE: by passing NewText as a string, it makes it possible to handle Pasted text as well as single key presses). |
|
Baldur
Senior Member Joined: 22 November 2006 Location: Germany Status: Offline Points: 244 |
Post Options
Thanks(0)
|
In AfterEdit-Event you have the NewValue you can change or in ValueChanged-Event you can change the Item.Value-Property.
|
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
Hi,
Yes, thanks. I did some workaround in the value changed event.
It's unbelievable that we have to do it like this. We have setmask and key events and both options are useless.
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |