LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Decrease number of cells displayed by array indicator

Solved!
Go to solution

When I am hacking through some VIs I have inherited, I often create an array indicator to follow the data.  I make an oversize indicator, i.e. may be seven cells for what turns out to be a five element array.

 

I can easily increase the number of displayed cells but do not seem to be able to decrease them.

 

Is there some trick I am missing?

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

Are you trying to do this programatically or just manually as you make the user interface? If you are trying to do it manually you can do it just the same way that you make the array bigger, drag the border smaller. If you are trying to do it programatically there is a property node called NumRows and NumCols that will allow you to adjust how many rows and columns are visible in your array.

 

Regards,

 

 

0 Kudos
Message 2 of 12
(3,460 Views)
Solution
Accepted by mistercat

When you first place a 1-D array control or indicator, LabVIEW doesn't know whether you might want to stretch it horizontally, or vertically.

So the RESIZE tool you get is a thingy on the lower right corner.

 

 

Screen shot 2012-02-08 at 9.20.13 PM.png

 

Once you've decided that you want to stretch it vertically, if you want to resize it again, the RESIZE point is at the center bottom.

 

Screen shot 2012-02-08 at 9.18.45 PM.png

 

If you've stretched it horizontally, and want to resize it again, the RESIZE point is the center of the right side.

 

Screen shot 2012-02-08 at 9.18.56 PM.png

 

Is this good UI?   Not if you ask me.  But no one asked me.  That's the way it is, though.

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 3 of 12
(3,454 Views)

What is it about it that you don't think is a good UI? Do you have a suggestion for improvement? You could create an idea in the LabVIEW Idea Exchange.

 

By the way, you don't actually have to grab the corner to resize it initially, and the handles appear regardless of where you are - you don't have to be on the corner. Any of the resize handles can be used initially. Once it's resized it makes no sense to show the resize handles which are not applicable.

0 Kudos
Message 4 of 12
(3,432 Views)

What is it about it that you don't think is a good UI?

 

Having a tool that changes it's location and appearance from one use to the next is not good, in my book.

 

The resize tool changes from the little "corner" looking thing in the corner at first to a double-headed arrow in the middle the next time.

 

Assuming this was the original poster's problem, I'm not the only one not expecting that.

 

And of course, the double-headed arrow for resizing the ARRAY, is exactly like the double headed arrow for resizing the CONTROL that's inside it, and the handles are sometimes within 2-3 pixels, so it's a pain to choose the correct one.

 

In my view, the original way of doing it was just fine.  There was a special cursor for resizing an ARRAY (as opposed to the thing inside it), it only worked on the corners of the array, and it would work horizontally and/or vertically, depending on if it was an H 1-D, V 1-D or a 2D array.

 

I suggested all that back when it was changed (several years ago now).  I was told this is the way it is.  So this is the way it is.

 

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 5 of 12
(3,427 Views)

@CoastalMaineBird wrote:

What is it about it that you don't think is a good UI?

 

Having a tool that changes it's location and appearance from one use to the next is not good, in my book.

 

The resize tool changes from the little "corner" looking thing in the corner at first to a double-headed arrow in the middle the next time.


But this is actually consistent. The cursor is a double-headed arrow whenever you're hovering on one of the "middle" handles, regardless of whether it's the first time resizing the array or after it's already been resized. I guess I'm not understanding what you're referring to.

 

 


And of course, the double-headed arrow for resizing the ARRAY, is exactly like the double headed arrow for resizing the CONTROL that's inside it, and the handles are sometimes within 2-3 pixels, so it's a pain to choose the correct one.

This I agree with, and I've always found this to be a real annoyance.

0 Kudos
Message 6 of 12
(3,421 Views)

Well, if you're going for consistent, then be consistent. Remove the little corner thingy, and make the only way to resize an array be from the middle.

Or restore it and make the only way you can resize it be from the corners.

 

But to leave the corner thingy sometimes, and then take it away - that's what is bad UI.

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 7 of 12
(3,415 Views)

Thanks.  You are absolutely right that this is bad UI.  I never would have figured out to look for two different cursors in two different places.  It's just silly. It's like having a different cursor for typing capital letters - inconsistent and confusing.  I maintain it's confusing because I was confused by it.  UI doesn't get more basic than that.

0 Kudos
Message 8 of 12
(3,393 Views)

Well, I hate to tell you folks this, but what you see is completely consistent with just about every UI that I've ever seen. Open up a drawing program. Like Paint. Draw a rectangle. Put the cursor over the resize handles. You will see two different cursors depending on whether you're on the corner or on the side. On the corner it's a diagonal cursor. On the side it's either a horizontal or vertical cursor.

 

I also disagree with the contention that it's "bad UI", since you want cursors to change to indicate a different behavior.

0 Kudos
Message 9 of 12
(3,386 Views)

Draw a rectangle. Put the cursor over the resize handles. You will see two different cursors depending on whether you're on the corner or on the side. On the corner it's a diagonal cursor. On the side it's either a horizontal or vertical cursor.

 

And does PAINT stop using the corner cursors after you've resized the rectangle?  No, they're still there.

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 10 of 12
(3,384 Views)