Asking password before setting a component


TheNovice

Recommended Posts

I am using an Edit Box Component and on click of Set button I want some script to run where I can ask for password, match the password and then set the channel value.

I can do it by just providing a normal text box and separate button which will run the action, it is more work as I have many Edit boxes where I want to implement something like that. Also one more problem with that is by using system.EntryDialog I can ask for password but it displays plain string and not '***', is there any way to make text in EntryDialog to be password type ('***').

 

Or, Is there any other efficient way to do the whole process which I am trying to do because I have multiple set components.

Thanks.

Link to comment
Share on other sites

First, you might want to check this post I made about using Edit boxes:

https://support.azeotech.com/topic/3233-edit-boxes-in-hmi-software/

At present there is no way to make EntryDialog cover passwords.  You'd really just have to create your own popup window with a password edit box and a nice function to call it.

As for the first part, you might try using the OnChange event of the Edit Box.

 

Link to comment
Share on other sites

I have already implemented it using OnChange event.

I'll try to do everything in a pop up as said in the link with some valid reasons, thanks for the link.

 

Also, I would like to know, is there anything similar to 'this' keyword in Daqfactory? because it can help to keep the code clean while writing a function similar to this.

Link to comment
Share on other sites

There is in the next release, which will probably be in January.  It's not quite "this" as that returns a pointer, but rather a string that returns the component name, called, appropriately, "ComponentName".  So you can pass this to a common function, then use execute() or evaluate() to access the component by name.

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.