simonkrauter / NiGui

Cross-platform desktop GUI toolkit written in Nim
MIT License
718 stars 50 forks source link

Does NiGui have textbox for password? #85

Open rockcavera opened 4 years ago

rockcavera commented 4 years ago

If so, could you give an example of how to do it?

machineko commented 4 years ago

Would love this feature :)

0x4c756e61 commented 3 years ago

I don't know if you can write in or not (in the code) but if you can, you just have to store in a sequence every chars typed in it and replace it with an * in the textbox

Edit: The content is editable from code

method text*(textBox: TextBox): string {.base, locks: "unknown".}
method `text=`*(textBox: TextBox, text: string) {.base, locks: "unknown".}

There is also an event that get triggered when the "text" changes