LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

smartest way to create Help for application

Hi all,

I'm looking to design the coolest and smartest way to add help functionnality to an application.

What I would like : the user push on F1, and click on any control//indicator on my application and this open a web page depending on where he clicked.

 

=> The problem is that it requires an event "application: mouse down", which doesn't exists.

 

Coding events for each control//indicator would be too long, and not clean in my code !

 

Any idea ?

 

P.S : It could be a great idea to forbid the word "help" in message object such as "I need Help" or "Help to do..."

V-F
0 Kudos
Message 1 of 11
(3,332 Views)

@ramses64 wrote:

.....The problem is that it requires an event "application: mouse down", which doesn't exists....

 


The Mouse Down Event does exist! For almost all Frontpanel Elements.

 

 

Christian

0 Kudos
Message 2 of 11
(3,324 Views)

You can make a combined event case for all your controls on Mouse Enter, which basically just remembers which control you're hovering over (e.g. store the control Label). When pressing F1, a helpfile about this Label is shown.

 

/Y 

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 3 of 11
(3,317 Views)

Hi,
For an application with cluster of clusters of arrays of bools//int//datetime... etc, it's verry borring to create a mouse enter for each control//indicator.
And this solution is only for a vi, not for an application (with several user interface VIs)...

Christian : I don't search "mouse down event" for each element, i search "APPLICATION: mouse down"...

V-F
0 Kudos
Message 4 of 11
(3,310 Views)

@ramses64 wrote:


Christian : I don't search "mouse down event" for each element, i search "APPLICATION: mouse down"...


Applications don't receive mouse down events. Windows do. Thus, a MouseDown event would be tied to a GUI element, such as a control/indicator, or the window's pane.

0 Kudos
Message 5 of 11
(3,295 Views)

So what could be the better way to implement a html help for my application ?

V-F
0 Kudos
Message 6 of 11
(3,289 Views)

I never implied your method was bad. You said you were looking for the Application:MouseDown event and said it didn't exist, and I explained why. If you want to implement using your method I would suggest registering the MouseDown event for all your controls/indicators. You do not need to do this one-by-one, and you only need one event case. Look at the shipping example that deals with dynamically registering for events. That example shows how to register the mouse down event for all front panel controls/indicators.

0 Kudos
Message 7 of 11
(3,285 Views)

@ramses64 wrote:

Hi,
For an application with cluster of clusters of arrays of bools//int//datetime... etc, it's verry borring to create a mouse enter for each control//indicator.
And this solution is only for a vi, not for an application (with several user interface VIs)...

Christian : I don't search "mouse down event" for each element, i search "APPLICATION: mouse down"...


You do know you can have 1 event for several items? 

 

Attached is a simple and sloppy example, it'd be easy to complement with a AE to keep the label and also clear it on mouse leave event.

/Y 

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 8 of 11
(3,283 Views)

Hi smercurio,

I tried to register a dynamically event :

Capture.PNG

 

but this doesn't work : it only works for 1rst level controls (if a cluster is in a tab control, the cluster doesn't appears in references).

I should do a reccursive method to list all controls, but I think this wouldn't work : when you click on a cluster, this will give the reference of the cluster, and not of the control included in the cluster...

 

Thanks for your help !

 

 

 

V-F
0 Kudos
Message 9 of 11
(3,282 Views)

Hi Yamaeda,

 

your exemple well works, BUT (there is always a but ! :-))

 

        - this is for a VI (I have to implement this in all my user interfaces)

        - this is for simple controls, not for clusters of clusters of arrays of clusters...etc...

        - for a large application, I will have to list items one by one on the event structure...

 

Best Regards,

V-F
0 Kudos
Message 10 of 11
(3,277 Views)