StablexUI icon indicating copy to clipboard operation
StablexUI copied to clipboard

InputText As Password Param for XML

Open dresch86 opened this issue 9 years ago • 5 comments

How can I use XML attributes to set InputText to password? I saw an earlier issue how to do it programmatically, but not the XML way.

dresch86 avatar Oct 15 '15 20:10 dresch86

<InputText label-displayAsPassword="true" />

RealyUniqueName avatar Oct 15 '15 22:10 RealyUniqueName

@RealyUniqueName I added that into my XML and the code compiles, but the password field still shows regular characters.

dresch86 avatar Oct 16 '15 00:10 dresch86

What target do you compile for?

RealyUniqueName avatar Oct 16 '15 09:10 RealyUniqueName

Windows for testing, but I plan to release for mobile (iOS, Android) and HTML5 in the near future.

dresch86 avatar Oct 16 '15 11:10 dresch86

Perhaps displayAsPassword is not supported in current OpenFL version: https://github.com/openfl/openfl/blob/28984d5e4145f559c46aea2daa0ec9c9fa009508/openfl/_internal/renderer/cairo/CairoTextField.hx#L134

Can you try simple openfl.text.TextField with displayAsPassword? If it does not work, then it can be implemented in StablexUI only with extending InputText.

According to OpenFL feature matrix displayAsPassword is currently not supported. However you can try to compile your project with NME instead of OpenFL. As far as i remember this feature is implemented in NME.

RealyUniqueName avatar Oct 16 '15 12:10 RealyUniqueName