LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Disabling entry into empty ARRAY element ?

Solved!
Go to solution

Yeah, but look at the picture I posted above.  Yes, I can prevent them from adding things, but it's ugly to have it there. That's really what I'm trying to get rid of.

Giving them a place to type and then saying "no, no, you can't do that" is bad UI.

 

I'm working on Ben's idea with a customized array control, and struggling with the weird interface for customizing (error bells that tell me nothing, handles for resizing things that don't really resize things, etc.).

I got it to work with a slider, but oddly enough, it won't work with a scrollbar.

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 11 of 18
(1,365 Views)

When replacing parts be very careful to get the data type correct or it will just beep at you. So if the scrol bar is U32 make sure what you are using to do the replacement has the same data type.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 12 of 18
(1,363 Views)

OK, thanks, Ben.

 

I've made it work, though it's not like I would like it.

 

Can't seem to make the scrollbar work.  It just dings when I replace the slider with a scrollbar.  I did set the scrollbar to U32, but no go.

 

Anyway, thanks for your thoughts.

 

Screen shot 2011-05-23 at 11.50.53 AM.png

 

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 13 of 18
(1,360 Views)

Please support >>>> this idea <<<<! it is really needed!!!

 

Why does it only have 24 votes????

 

For more details, also have a look at my comment and the link in it.

 

Message 14 of 18
(1,360 Views)

Please support >>>> this idea <<<<!

 

Well, I added my support, so I'm sure NI will get right on that.

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 15 of 18
(1,355 Views)

I should explain that I set the slider size for 15 rows, but for testing, I set the array to be six rows high.  Anyway, it works, because when the scrollbar is at the bottom, the last row shown is #8 out of 8.

 

The code is simple:

Array.NUMROWS = min (array.length, max screenspace)

Array.INDEX VISIBLE = array.length > max screenspace

Slider.Scale.MaxValue = min(array.length - max screenspace,1)

 

(use the minimum 1 to keep out of a min=0, max=0 situation)

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 16 of 18
(1,353 Views)

@CoastalMaineBird wrote:

Yeah, but look at the picture I posted above.  Yes, I can prevent them from adding things, but it's ugly to have it there. That's really what I'm trying to get rid of.

Giving them a place to type and then saying "no, no, you can't do that" is bad UI.

 

I'm working on Ben's idea with a customized array control, and struggling with the weird interface for customizing (error bells that tell me nothing, handles for resizing things that don't really resize things, etc.).

I got it to work with a slider, but oddly enough, it won't work with a scrollbar.


I am assuming this was a reply to my post. If you used that approach you would not have the slider. In addition, if the user began typing something in it is true it would be there while they entered the data. However, the data would not be included in the array when they hit the add button. In addition, you could clear the erroneous row they tried to enter. I have used the transparent control and it works fairly well. I was only offering an alternative method.

 

In the past I have implemented my own scroll bar for the array and managed its range based on the size of the array. Here is the code I played around with as I was developing it.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 17 of 18
(1,340 Views)

If you used that approach you would not have the slider.

 

--- Understood.

 

 

In addition, if the user began typing something in it is true it would be there while they entered the data. However, the data would not be included in the array when they hit the add button.

 

Yes, but I want them to be able to edit anywhere on the display - any of the 15 rows. It's cumbersome to have to pick a row from the display, and have another control show the data where they can edit it, then they click ADD or DONE or something.

 

 

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 18 of 18
(1,328 Views)