LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Set cursor error 26

Solved!
Go to solution

Hi,
I want to change the cursor of a panel when I press a button.
I'm having an issue when I call the "set cursor.vi" in a VI called in a subpanel.
The Main.vi calls the subvi.vi and when I press the boolean button I got the error 26...
I already looked at previous discussion but it didn't solve my problem...
I put my VIs in this message, if anyone got an idea I'm interested.

Thanks and have a good day all !

Download All
0 Kudos
Message 1 of 9
(2,472 Views)

A subvi in a subpanel lives in the window of the owning vi, so there is only one cursor for both. You must pass the owning vi reference to the subvi in order to change the cursor shape.

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
Download All
Message 2 of 9
(2,448 Views)

Hi,

Thanks for your response, unfortunatly this doesn't solve my problem.
I created multiple subpanels to deal with severals independent tasks.
I need to make the user understand that this subpanels is loading something but he can still go on the others subpanels...
The mouse icon was the best solution here.
That's a shame !

0 Kudos
Message 3 of 9
(2,424 Views)

There are other simple ways to do this, for example showing/hiding a string indicator with a "Wait..." text or similar.

Also, changing the cursor size doesn't actually prevent the user to interact with the subvi controls, as also implied in your code. If you need to do this, you may use a transparent String indicator on top of the whole Front Panel.

This is only one of many possible suggestions.

 

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 4 of 9
(2,416 Views)

Thanks,
I thought about that but my issue is that I got only 1 control on my VI loaded in my subpanel in order to manage automatic scale.
This is a multi column listbox, putting another control on the front panel won't be esthetic.
Well it's not a huge problem but it's quite frustrating.
If anyone else got an idea before I fall into despair ^^'

0 Kudos
Message 5 of 9
(2,410 Views)

It really depends on what you want to do in detail. If you have one control occupying the whole Front Panel of the subvi, you may use the Mouse Enter and Mouse Leave events of this control to change the cursor shape when entering and back to original when leaving.

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 6 of 9
(2,399 Views)

Hey !
I can't do that because I need to change the cursor during the execution of an acquisition VI that may last for 10secs.
Yeah...each time I have the feeling that it is a small problem that can be solved easily, but in fact it's not that simple ^^'

0 Kudos
Message 7 of 9
(2,380 Views)
Solution
Accepted by TenJigoku77

I think it can be done with a little coding. You need the following ingredients:

- use the events This VI ->Mouse Enter and This VI ->Mouse Leave

- manage those events in a parallel loop of subvi

- keep track (e.g. in a local variable) of whether the acquisition vi is running or not

Another possibility is to use a single loop and run your acquisition vi asynchronously (using Start Asynchronous Call Node).

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 8 of 9
(2,340 Views)

Hi,
I tried what you suggested and it works !
I expected something easier to implement but it should do the job.

Thanks again

PS: I put my solution in the VIs below for the interested ones;)

Download All
0 Kudos
Message 9 of 9
(2,229 Views)