Jump to content

message display on Mouse click

Recommended Posts


I am reading 96 bits corressponding to the 96 lines from a binary file and switching ON/OFF 96 LEDs in a subpanel VI(Sub VI is named STATUS.vi) in my front panel. The LEDs are of CONTROL type and their mechanical action is "switch when pressed". Now, I want to display some details about each line(like why it is OFF or ON) in another subpanel when I click on any one of the LEDs. I tried using event structure in the STATUS.vi, but it waits for the key down event of the 1st LED, displays the message and then only displays the status (ON/OFF) of the second LED. If I want to see the status of 3rd, then again I have to click the 1st or 2nd LED. Is there any way to first display the status and then display the message upon mouse click?

Can anyone help me? I hope I have made my question clear.

Link to post

How are these 96 boolean indicators arranged on the subpanel :question:

Is it a 1-d array of booleans. Is it 96 discrete indicators, or is it a 2d array of indicators.

However they are arranged, we must find a way to capture the mousedown event for all of them.

I am confused though by your quote

I want to display some details about each line(like why it is OFF or ON) in another subpanel when I click on any one of the LEDs

If you are reading the bit values from a file, and then turning the LED's on an off according to those 96 bits, how do you determine what details to display?

I am possibly getting too involved in details that don't matter.

If these LEDs are only indicators in an array, then you will most likely need to grab the coordinates of the mouse down event and from there determine what indicator you have clicked on.

Attach your front panel and it will shed some light on your solution

~,~ The Captain was here

Link to post


The LEDs are arranged as 16X6 array and it is of control type. The LEDs will be displayed on the front panel by a call to another VI(subVI). I will be reading a continous chunk of 96 bits until EOF and based on some rules, I will some message to be displayed on a "details window" (which is also opened by a call to another VI) when the user clicks on each LED . Right now I don't have the files with me. I will attach it and send it to you in the next half of the day. Bye!

Link to post


I have attached a zip file that contains all the VIs required by the main VI, test.vi. Click the GNG button on the test.vi front panel. Three subpanels will open. In the acquisition panel, just click the acquire button and choose the binaryfile1.dat. The LEDs(right now only 6 out of 96 of them) will show some status. Now, if I click any of those LEDs, some message should be displayed on the details window. Run the status1.vi separately and you will know my problem.

Thanx & Regards,


Download File:post-600-1093881430.zip

Link to post

You're still missing the GNG-Global.vi

Oh, yeah. And whatever you are trying to do w/ all those subpanels. DON'T :thumbdown:

There are much better ways to accomplish whatever you are trying to do.

Why do you have a multiple subpanels called border.

Are you actually using a subpanels to display a border between two different portions of the screen?? :blink:


If you want to display a message any time that an led is displayed on your screen, every led must be registered to the event and then use the CtrlRef on the inside of the event structure and wire it to a property node and get the label text of the control that fired the event. Wire that to whatever determines what message to display to the user then pass that message to the popup dialog.

Have fun.

Link to post


Thanx for your reply. I dod the way you told for mouse click & message display and it works fine.

Yeah! I am using subpanels to display borders. I don't know whether I can do this anyother way bcoz they should be displayed only when the subpanels open.

You have mentioned that "There are much better ways to accomplish whatever you are trying to do." Can you elaborate on those better ways.

Thanx & Regards,


Link to post

An easy way to make decorations appear and disappear is to drop an OK button on the screen. Remove the "OK" text and then color one of the cases transpartent. Then all you have to do is wire a T or F to the input of a bunch of booleans when the panels are loaded.

Thats the quick way to accomplish disapearing decorations.

I'll post more on improvements later. But for now try and search for "State Machine" within the posts. You'll discover some powerful ways to make your programs easier to write and read.

Link to post

Join the conversation

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

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.