EditBox -> ValidationString

For help with anything that CEGUI doesn't offer straight out-of-the-box, e.g.:
- Implementation of new features, such as new Core classes, widgets, WindowRenderers, etc. ...
- Modification of any existing features for specific purposes
- Integration of CEGUI in new engines or frameworks and writing of new plugins (Renderer, Parser, ...) or modules

Moderators: CEGUI MVP, CEGUI Team

User avatar
olgarry
Not too shy to talk
Not too shy to talk
Posts: 26
Joined: Sat Jan 14, 2006 10:23

EditBox -> ValidationString

Postby olgarry » Wed Feb 08, 2006 19:37

Hello,

Can someone tell me how works the ValidationString of an EditBox.
What characters in this ValidationString validate what text?

Thanx

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: EditBox -> ValidationString

Postby CrazyEddie » Thu Feb 09, 2006 09:27

Hi,

The validation string is a regular expression. If you're not familiar with RegExs then a google will help you no end there ;)

But basically, something like:

Code: Select all

".*"

will match (in the case of cegui, this means 'allow you to type') any character any number of times.

And:

Code: Select all

"[0-9]*"

Will match the digits 0 to 9 any number of times.

One caveat is that the string being entered must match the regex at all times. This means that for certain advanced possibilities you need to get creative with the regex validation string - most things can be achieved with a little work ;)

HTH

CE.


Return to “Modifications / Integrations / Customisations”

Who is online

Users browsing this forum: No registered users and 4 guests