LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
klessm1

Add Tab page drop and drag

Status: Declined

Any idea that has received less than 3 kudos within 3 years after posting will be automatically declined.

If creating a "file view" tab control it is nice to be able to reorder the tabs by dragging the tab.  Currently there are no "drag started" events for tab pages.

It would make it really easy if there was a tab property called "enable page reorder".  I know currently the Tab is an enum so it would not make sense in that case, but if you just move the "Tab Caption" then it works.

 

If there were enough events and location information for the tabs I think it would be possible even if the functionality for "moving tabs" wasn't fully built in.

 

See any program with tabs for an example.  IE, Google Chrome, Notepad++.

4 Comments
AristosQueue (NI)
NI Employee (retired)

The idea is reasonable, but unless it gets a lot of kudos, it is highly unlikely to be implemented because it would require completely redefining the Tab control as a non-enum, making the pages dynamically instantiable, which in turn implies that the controls displayed on those pages are not set at compile time. Not likely.

 

In the meantime, I think that to do this at all well, you're going to need to define your own UI element in LabVIEW, probably including drawing the tabs with the picture control and implementing it that way.

tst
Knight of NI Knight of NI
Knight of NI

It's certainly possible to do this today in code using a picture control and a subpanel:

 

http://www.dailymotion.com/video/xmtmvf_topaze-tab-navigation_tech

 

http://sine.ni.com/nips/cds/view/p/lang/en/nid/210425 

 

That doesn't include the source, but seeing an example might inspire you enough to create this yourself. Presumably, you could make this into a reusable piece of code.


___________________
Try to take over the world!
klessm1
Member

A picture control is probably the best way to go, but would require quite a bit of development time investment (which I don't have for the current project I am working on).

With a tab control I get most of the functionality that I want, just not the drag started event on a page and the ability to know the location of the tabs in relation to the mouse location.

The system tab even has the ability to create the scroll arrows for going through the tabs when all of the tabs can be shown on the screen at once.  Adding that feature to a picture control is going to take some time.

 

I think a more seamless, dynamic, and elegant solution is the picture control. Even if I had those events the tab would not be moving with the mouse so it would not look that great. For right now I will probably just include a screen like current rearrange tabs screen built into the right click menu of the tab control to enable the user move the tabs around. A little clunky, but for my application moving the tabs around probably isn’t going to be a make it or break it feature, although the drag and drop ability makes it behave more like a "real" application (plus it looks cool Smiley Happy). 

 

Darren
Proven Zealot
Status changed to: Declined

Any idea that has received less than 3 kudos within 3 years after posting will be automatically declined.