Thomas Robertson Posted March 22, 2013 Report Share Posted March 22, 2013 Hi, We're about to try to do an ambitious experiment that if it works will drastically change the look and feel of our software. I wanted to see if someone has already done this or if it's been tried before by smarter minds than ours and shown to be un-doable. Our software allows people to create display windows (like graphs and tables) at will that in turn open up in separate windows. We would love to be able to constrain these windows within our program window, bind them to tabs on the main window, do soft-snapping with other windows, allow them to be docked, bind them inside window panes so that if there are too many of them you can scroll up/down to see them rather than have a mess of windows all over your screen, and all kinds of other spiffy things that you can do in other programming languages. However, LabVIEW doesn't seem to be up to the task from what I can tell of it's vi property/invoke nodes. I recently was successful at making something closer to what we want, however. I made a fake window toolbar from a picture control, put a subpanel underneath it, and put another control at the bottom right of the subpanel control for resizing. I then captured mouse clicks and mouse drag events to detect the picture control being clicked on and drug to move the "window" around and similarly for the window resize control. Attached is an image of the fake window Doing this I was able to have this "fake" display window contained within a tab on our main application window that was able to be moved around and could even be moved off the screen but accessed via the scroll bars. Now the question is whether we can scale this up. We're going to try to create an Xcontrol which has the titlebar, subpanel, resize control and handles mouse events. I'm not sure this is possible, however. Whether we can get all the mouse event handling worked out and passed to the proper Xcontrol, and whether this scheme will put too much load on the processor. So... Anyone done this before? Quote Link to comment
hooovahh Posted March 22, 2013 Report Share Posted March 22, 2013 Well a few links that I'm sure you've already seen. Ben's Docking example Dynapanels tst array of subpanels Snap off windows Messing Around with Splitters (can't seem to find source) By combining all of these you can get some neat UI functions. I've tested a few UI techniques and you can get some very nice flowing applications. I think what you are trying to do is very possible but will take some time ironing out the kinks. The things I've done with it were not as feature complete as what you are proposing. One thing to keep in mind is it maybe a good place for some OO code. You might be able to make new instances of a classes and then override the class with functions for the specific UI element. This could be an architecture where there are instructions on how to make your own UI elements that can be plugged in and used. Quote Link to comment
Yair Posted March 24, 2013 Report Share Posted March 24, 2013 A couple of other examples you can look at are Jack Dunaway's cognizant UI example and Xtab, both in the NI communities. Quote Link to comment
Thomas Robertson Posted March 25, 2013 Author Report Share Posted March 25, 2013 The cognizant example may be a very good jumping off point for us, great lead! Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.