LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Window Manager for LabVIEW?

Hi all,

 

I'm developing an application that involves asynchronous alarms. These alarms can be automatically displayed to the user in small pop-up windows that disappear once the user acknowledges the alarm, or when the alarm condition is no longer active.

 

Ideally I'd like for the alarms to be "docked" to the side of the main application window, like so:

 

ijustlovemath_0-1598386902723.png

The behavior of the "Alarm column" would be governed by a window manager, the way a (very limited) tiling window manager might, eg:

 

- When a window is added to the alarm column, it will occupy the first available space

- All tiles within the column are the same size

- When an alarm closes, the remaining alarms will be arranged so that the newest active alarm is on top of the stack

- When more alarms than can be shown are in the column, the newest alarm window is placed on top of the oldest existing alarm (or some way to make sure new alarms always shown to the user, given the limited available space in the Alarm column)

 

I tried searching for this on Github, DuckDuckGo, and in the VIPM but didn't find anything. Anyone got a nice QMH or similar that takes care of this sort of functionality?

0 Kudos
Message 1 of 12
(1,544 Views)

Splitter bars and subpanels. Give those a looksie.

Redhawk
Test Engineer at Moog Inc.

Saying "Thanks that fixed it" or "Thanks that answers my question" and not giving a Kudo or Marked Solution, is like telling your waiter they did a great job and not leaving a tip. Please, tip your waiters.

0 Kudos
Message 2 of 12
(1,540 Views)

Ideally I'd want this area to have nothing at all when there's no alarms; proper popup windows and not just a vacant "notification area". Subpanels and splitters would not satisfy that.

 

Also I was certain this is a generic enough problem that someone would have solved it before!

0 Kudos
Message 3 of 12
(1,534 Views)

Also, side note, we definitely are both from the same small town in WNC. Small world!

0 Kudos
Message 4 of 12
(1,532 Views)

@ijustlovemath wrote:

Ideally I'd want this area to have nothing at all when there's no alarms; proper popup windows and not just a vacant "notification area". Subpanels and splitters would not satisfy that.

 

Also I was certain this is a generic enough problem that someone would have solved it before!


That was the first thing that came to my mind. I feel like you could dynamically change the location of the vertical splitter bar based on if there are or aren't any alarms at a given time. But yeah maybe someone has made something similar that they can just give you and save you the trouble.

 


@ijustlovemath wrote:

Also, side note, we definitely are both from the same small town in WNC. Small world!


I'm from Blacksburg, Virginia lol. That can't be part of WNC right?

Redhawk
Test Engineer at Moog Inc.

Saying "Thanks that fixed it" or "Thanks that answers my question" and not giving a Kudo or Marked Solution, is like telling your waiter they did a great job and not leaving a tip. Please, tip your waiters.

0 Kudos
Message 5 of 12
(1,523 Views)

Oh, my bad! I thought Moog was exclusively in Asheville. And yes, I do see what you're saying and am inclined to code a generic ish solution myself, but if there's opportunity to re-use code, I'm all for it!

0 Kudos
Message 6 of 12
(1,518 Views)

Have you tried: NI's Windows API Function Utilities (32-bit) for LabVIEW at:

https://forums.ni.com/t5/Example-Code/Windows-API-Function-Utilities-32-bit-for-LabVIEW/ta-p/3996462

 

 

George Zou
Message 7 of 12
(1,514 Views)

Aside from the setting Z position, this doesn't seem to be what I'm looking for. I'll hang on to this in case I have to implement it myself!

0 Kudos
Message 8 of 12
(1,501 Views)

Absolutely no idea if this will help you in any way or not. But either way, it is a really cool demo IMO and might be useful to you elsewhere.

 

Also, Moog operates in 20 countries!

Redhawk
Test Engineer at Moog Inc.

Saying "Thanks that fixed it" or "Thanks that answers my question" and not giving a Kudo or Marked Solution, is like telling your waiter they did a great job and not leaving a tip. Please, tip your waiters.

0 Kudos
Message 9 of 12
(1,497 Views)

A couple ideas come to mind. As far as I know, there is no way to have a window actually appear and stay docked to the side of another LabVIEW window. In fact, I've never seen that as part of any other Windows application.

 

The "simplest" solution would probably be to add a splitter bar and an array of clusters, each of which can hold its own notification. (You can also use subpanels but you can't add new subpanels at runtime, and you can't put them in an array so there's lots of manual switching and moving to do.)

 

If there are no notifications, you can adjust the width of your main window to hide the alarm area. If there are notifications, widen the screen to show the alarms, and add new ones to the "Alarm list" array. You could detect value change events on the array (or Mouse Down, etc), then process the array to see which element changed, then delete that element. That would be a simple way to do it.

 

You could also get WAY more complicated and implement an MDI: https://www.mooregoodideas.com/mgi-library/panel-manager/dotnet-panels/

 

I haven't used that one in particular but MGI's other panel management stuff is fantastic.

0 Kudos
Message 10 of 12
(1,491 Views)