02-08-2012 07:09 PM
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?
Solved! Go to Solution.
02-08-2012 07:19 PM
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,
02-08-2012 08:24 PM
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.
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.
If you've stretched it horizontally, and want to resize it again, the RESIZE point is the center of the right side.
Is this good UI? Not if you ask me. But no one asked me. That's the way it is, though.
Blog for (mostly LabVIEW) programmers: Tips And Tricks
02-09-2012 01:34 PM - edited 02-09-2012 01:34 PM
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.
02-09-2012 02:13 PM
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.
Blog for (mostly LabVIEW) programmers: Tips And Tricks
02-09-2012 02:38 PM - edited 02-09-2012 02:39 PM
@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.
02-09-2012 02:47 PM
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.
Blog for (mostly LabVIEW) programmers: Tips And Tricks
02-13-2012 10:51 AM
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.
02-13-2012 11:12 AM
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.
02-13-2012 11:18 AM
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.
Blog for (mostly LabVIEW) programmers: Tips And Tricks