Pi.R Posted September 23, 2016 Share Posted September 23, 2016 Hello, I want to use dX functions for my User Interface. I'm starting with a login panel and I was wondering how I could emulate the edit field of the GUI functions. Should I still use a edit field in a dxRectangle? How can I do it? Cheers! Link to comment
Dealman Posted September 24, 2016 Share Posted September 24, 2016 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. 1 1 Link to comment
Pi.R Posted September 24, 2016 Author Share Posted September 24, 2016 Seems complicated.... Can't I use a GUI input, set it's background Alpha to 0 and only display the text inside? Link to comment
Dealman Posted September 24, 2016 Share Posted September 24, 2016 You can, but if I recall correctly only the background is hidden. The text will still be visible and you can't change colour of it. Play around with it. Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now