Turn a TextArea into A password

BlitzMax Forums/MaxGUI Module/Turn a TextArea into A password

Leon Drake(Posted 2006) [#1]
Well i have been trying to get the simple textfields to change color for my skinned window. Eh no luck though. i just needed a simple password textfield. However since Textareas are the only gadgets that can have there colors changed i did find a way to change a textarea into a password textarea.

Include "bin\user32.bmx"
Global windowt:TGadget = CreateWindow("win",200,200,200,300,Desktop(),1)
Global txtarea:Tgadget = CreateTextArea(10,10,100,20,windowt)

hWnd = QueryGadget(txtarea,1)
SendMessageA(hWnd, EM_SETEDITSTYLE, ES_PASSWORD,0)
SendMessageA(hWnd,EM_SETPASSWORDCHAR,1,0 )



there you go. it should make the Textarea into a password area. I know im not the only one who needed a colored password textfield... but i semi solved the problem by making the text areas use the same functionality.


Leon Drake(Posted 2006) [#2]
i know that this command
SendMessageA(hWnd,EM_SETPASSWORDCHAR,1,0 )
is used to set a specific password char.. im not sure what keycode its using.. but for some reason setting it to just a 1 makes a *. i guess you'd have to play around with it a bit to change the * to something else