Jump to content

Input fields with dxDraw


Pi.R

Recommended Posts

You'll have to use onClientClick to detect if a user has clicked within the text-field. If true, you'll want to prevent MTA from registering input if necessary, this can be done via toggleAllControls for example.

Once the text-field has "focus", you can use the event onClientCharacter to allow them to type text into that text-field. Store the letters in a table and also use this table to display the text entered on-screen. If it's a masked text-field for passwords, you can use gsub on the string to replace all characters with * for example(not on the table itself, obviously).

Then there are some other workarounds you need to do such as deleting characters via backspace/delete, moving the caret index left and right via arrow keys or whatnot. Depends on how much functionality you want to add.

  • Like 1
  • Thanks 1
Link to comment

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
  • Recently Browsing   0 members

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