Jump to content

event when deselect control?


Houmoller

Recommended Posts

Hello Lava-people

Is it possible to have labview generate an event when a control is deselected?

 

I have a search bar in my application. When the user selects the string-control, a connection to a database is established. When the user is done searching the database, and selects a new control, I would like to destroy the reference to the database thus freeing up the database.

 

Is this possible?

 

Hope you can help me.

 

/Jørgen 

Link to comment

Hi,

 

I don't know of any "direct solution" for that, I think you have 2 options :

- keep checking if that string control has the focus (using a property node on that string)

- keep checking the panel's property called "Text Focus", it will return the label (name) of the control that will receive the keyboard strokes

 

but both these options need to be placed in a parallel loop that will run at a certain rate.

 

hope this helps

Edited by Antoine Châlons
Link to comment

How about keeping track of which database connections have been made.  Then when a Mouse Down event happens on the string control disconnect any database connections that are open.  If none are open then do nothing.  If one was open from the last session then close it.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.