Jump to content

Tabbed Cluster Array


hma

Recommended Posts

Hi,

How about a manner to define a cluster on a tab page and define its size and automatically generate a tab page with the same layout for each cluster index?

I need to enter the data of 16 different specimen for testing purposes. Until now, I programmed it in a loop with a vi and popup window, but if some data of some specimen is wrong I have to go trough the loop again until I attein the right specimen, change the data and continue looping through the rest of the specimen. It would be much easier if I could use a tab page for atteining the data of a specific specimen.

Hugo

Link to comment

Your description is quite unclear. Can you post an example of the code you are using so that we can understand what you're actually doing?

It's quite possible that there is an existing solution to your problem.

Also, it would be nice if you could explain some more.

Link to comment

QUOTE(hma @ Jun 5 2007, 03:17 AM)

How about a manner to define a cluster on a tab page and define its size and automatically generate a tab page with the same layout for each cluster index?

I need to enter the data of 16 different specimen for testing purposes. Until now, I programmed it in a loop with a vi and popup window, but if some data of some specimen is wrong I have to go trough the loop again until I attein the right specimen, change the data and continue looping through the rest of the specimen. It would be much easier if I could use a tab page for atteining the data of a specific specimen.

I understand this to mean that you have an array of a cluster and instead of the index display, you'd like each element on a tab, to make a tab display for arrays. One could then tab through the elements of the array.

There's no native way to do this in LV. You could make a tab control yourself and put the same cluster on each one and then build them all into an array on your block diagram -- But of course you'll be stuck with a static number of elements. There would be no way to add or remove tabs based on how many elements you wanted.

One way to browse arrays that's new in 8 is the vertical/horizontal scrollbar, which may help. That way, you could drop your cluster array on the front panel and users could scroll through each one.

Then again, perhaps I didn't understand the question and I'm answering completely the wrong question... Let me know if you were asking something different.

Link to comment

Hiya

Because Mr. Burnell Got the hackin' ball rolling,

Here's my solution.http://forums.lavag.org/index.php?act=attach&type=post&id=6040

It uses the tab control simply as an enum. Personally, I would suggest using an enum. the values are shuffled into and out of the display cluster from the cluster array. Good points of this is that it only uses *one* cluster, ergo only one cluster to update. Bad points is the need to cycle data in-and-out of the cluster.

IMO, I would say that Mr. Plotzke is spot-on with the Idea of editing the array directly, using the scrollbar to shuttle between entries. This saves from having to initialize a separate cluster and cluster array. Also, This means that, should the need arise, one can expand the array size on the fly.

Cheers!

-H

Link to comment

QUOTE(Doon @ Jun 5 2007, 10:47 PM)

Here's my solution.http://forums.lavag.org/index.php?act=attach&type=post&id=6040''>http://forums.lavag.org/index.php?act=attach&type=post&id=6040'>http://forums.lavag.org/index.php?act=attach&type=post&id=6040

It uses the tab control simply as an enum. Personally, I would suggest using an enum. the values are shuffled into and out of the display cluster from the cluster array. Good points of this is that it only uses *one* cluster, ergo only one cluster to update. Bad points is the need to cycle data in-and-out of the cluster.

Not wanting to be picky, but how do you adjust the number of tabs at runtime if the array size isn't 8 elements long ? That's the tricky bit.

Perhaps one could make an array of booleans with a custom graphic on the button to make it look like a selected/deselected tab with transparent array housing with some logic to ensure only one element is true at any one time to simulate the tab strip and then usse the index of the true element to index into the array and use a single cluster control as in the above example.

If platform independence can be sacrificed and the target is Win32 then I think the ActiveX tab control can have new tabs added at runtime - if so, that could provide the tabs part of the UI with a single cluster control displating the current index.

Link to comment

QUOTE(Gavin Burnell @ Jun 5 2007, 04:54 PM)

Yeah, I ignored that issue :rolleyes: . I assumed that since hma had a finite set of entries, this might be a solution.

QUOTE(Gavin Burnell @ Jun 5 2007, 04:54 PM)

If platform independence can be sacrificed and the target is Win32 then I think the ActiveX tab control can have new tabs added at runtime - if so, that could provide the tabs part of the UI with a single cluster control displating the current index.

Bravo! :worship: This is definitely a very viable solution. Wowie!

-H

Link to comment

QUOTE(Gavin Burnell @ Jun 6 2007, 01:54 AM)

Perhaps one could make an array of booleans with a custom graphic on the button to make it look like a selected/deselected tab with transparent array housing with some logic to ensure only one element is true at any one time to simulate the tab strip and then usse the index of the true element to index into the array and use a single cluster control as in the above example.

If the problem is indeed as you folk described it, then I would definitely go with this solution.

Link to comment

Hi,

I have seen some interesting vi's now but what I was asking for was a nearly same mechanism like it is used in VB:http://forums.lavag.org/index.php?act=attach&type=post&id=6051

In VB you set the tabs on the front panel, select the properties: number of rows and colums, adapt the size of the tab page, create "the fields" on tab page 1 and copy next the fields to tab 2 and all following tabs (the number of copies isn't even in VB6 automatically equal to the number of tabs). Atomatically VB asks if it has to create for each "dublicated field" an array, indexed by the selected tab. Later on each field on the visible tab will display the contents of the elements of the arrays indexed by the tab.

In LV all "fields" on a tab page could be bundled to a cluster element in a cluster array indexed by the tab.

In any case thanks for the responses.

Hugo

Sorry, English isn't my mother tongue.

Link to comment
  • 1 year later...

QUOTE (hma @ Jun 8 2007, 08:02 AM)

Hi,

I have seen some interesting vi's now but what I was asking for was a nearly same mechanism like it is used in VB:

http://lavag.org/old_files/monthly_06_2007/post-4262-1181303115.jpg' target="_blank">post-4262-1181303115.jpg?width=400

In VB you set the tabs on the front panel, select the properties: number of rows and colums, adapt the size of the tab page, create "the fields" on tab page 1 and copy next the fields to tab 2 and all following tabs (the number of copies isn't even in VB6 automatically equal to the number of tabs). Atomatically VB asks if it has to create for each "dublicated field" an array, indexed by the selected tab. Later on each field on the visible tab will display the contents of the elements of the arrays indexed by the tab.

In LV all "fields" on a tab page could be bundled to a cluster element in a cluster array indexed by the tab.

In any case thanks for the responses.

Hugo

Sorry, English isn't my mother tongue.

I understand now what you want, but don't feel this type of Tab Control is ergonomic in any way. I usually feel annoyed whenever I see a tab control that goes over more than one line of tabs. The variant with scrollarrows to the right to scroll through more tabs than what is possible to put on the screen is only slightly better IMO.

Personally I prefer for cases like this the array index display approach with a Pull Down menu control or a List Box control being the element selector and the rest of the page presenting the currently selected array element. And that is not just because it is easier to do in LabVIEW than the multi row tab control :rolleyes: .

Rolf Kalbermatter

Link to comment

QUOTE (hma @ Jun 8 2007, 08:02 AM)

Just to play what if.... that was the program requirement.

Is something like that possible without resorting to an Picture control?

Each "layer" of tabs could be a normal LV tab control.

Mouse down on the tab would re-arrange the the tabs positions and front to back order (?).

Tab names can be define at run time but new tabs to stack on top of each and the controls and indicators ON the tab pages... Sub-panels that load when tab name is shown...

Turn the whole thing into an X-Control with methods to define number of layers, page name/sub-panel Sub-VI etc.

I guess it could be done, ...

BUT

SHOULD IT BE DONE?

Over lapping tabs with sub-panels in an X-Control is unchartered teritory in my book (anybody wander in those hollows?) and I'd plan for unstable ground (bugs with updates etc) and the perfromance would probalably vary with the number and complexities of rendering screen updates (how would even go about characterizing and testing the performance of a critter like that?).

I think I'd go with a pitcutre control to render the background tabs and use a tab control with Sub-Panels to render the foreground. That way it is a rather static background picture over a normal ... or even better! Two picture controls next too (one above one alaong side) the tab. THat would be a no over-lap approach.

Did I miss something? Done with my Sunday morning coffee. ;)

Ben

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.