Jump to content

GUICtrlCreateInput


david7411
 Share

Recommended Posts

Question is, how elaborate do you want it to be.

If you're ok with format checking done after user enters whole string/only when you actually need it, then you don't need much more than that RegExp (assuming it works fine). Read input when you need it, check with RegExp and notify user to try again if it doesn't match the correct pattern.

If you want realtime checking, possibly preventing user entering illegal characters, but at the same time keep the thing convenient and not confusing for the user, then you could have 6 GUICtrlCreateInput controls and do the monitoring on each of them. That's the method M$ uses too, for example some CD key dialog, and even the common IP address control is actually 4 edits rolled into one. Or have 1 GUICtrlCreateInput, but it could get a bit messy.

Anyway, for realtime checking, you'd need GuiRegisterMsg() WM_COMMAND, to catch EN_UPDATE notification. Search the forum with these keywords, there are a lot of examples.

Edited by Siao

"be smart, drink your wine"

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...