how to hide text in edittext or dotnet TextBox with dots ?

i create a script and add a key to lock it , everything ok , but i want to hide key with dots ,i think " dotNetObject:System.Windows.Forms.TextBox " can do it , can you help me , thank you very much

AttachmentSize
capture.jpg21.14 KB

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
alexnguyen's picture

:D

i can do it , thank you very much

pixamoon's picture

`

Hi,

It's easy with dotnet TextBox:

TextBox1.PasswordChar = "*"
--or to use dots
TextBox1.UseSystemPasswordChar = True

sample:

rollout a ""
(
	dotNetcontrol c "MaxCustomControls.MaxTextBox"
 
	on a open do 
	(
		c.UseSystemPasswordChar = True
		setfocus c
	)	
)

createDialog a

I don't think maxscript editText has this option. You can try to do it with extra variable to store key/password and function to replace characters with "*". But still there will be a problem to read position of cursor in editText. So I think the easiest option will be to just use dotNetcontrol "MaxCustomControls.MaxTextBox"

Best,
Pixamoon

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.