LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error when calling Top Row property of a listbox passed as reference

Solved!
Go to solution

I have a listbox that I want to scroll down when data is added to it, so users can always see the bottom of the queue. In the VI with the listbox, I set the Top Row property to (NumRows -  # rows) and it works fine. But I moved this to a subVI and passed a reference to the listbox control. The subVI uses a LstBox (strict) control, but when I call the Top Row property node for the reference, it throws up Error 1077: Invalid property value. 

 

Attached is a snippet of the VI. Labview 2020

0 Kudos
Message 1 of 7
(991 Views)

I think it is because the reference is a strictly typed one.  Certain properties are not allowed to be changed when the reference is strictly typed.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 2 of 7
(965 Views)

Is your property node 'Height' a 'Size:Height' property node? If yes you subtract a value in pixels from 'Number of Rows' which results very likely in a negative value, an invalid property value for 'TopRow'.

Instead of Height you need the number of 'ItemNames' in your calculation.

0 Kudos
Message 3 of 7
(940 Views)

Hi,

you could use this solution :

 

Emna20_0-1651240265519.png

Best Regards.

Thank you (kudos )

0 Kudos
Message 4 of 7
(931 Views)

@Emna20 wrote:

Hi,

you could use this solution :

 

Emna20_0-1651240265519.png

Best Regards.

Thank you (kudos )


I don't see any difference between your solution and my code.

0 Kudos
Message 5 of 7
(908 Views)
Solution
Accepted by topic author Nokaroa



@Nokaroa wrote:

@Emna20 wrote:

Emna20_0-1651240265519.png


I don't see any difference between your solution and my code.


 

Example%20Listbox%20Error

Obviously there is a difference. You use 'Height' in your calculations, Emna20 uses the size of the array.

 

But be careful. If NumRows is greater than the size of the array, the difference can be negative, which is not a valid input for TopRow.

You have to limit the value for TopRow to be greater or equal to 0. Look at the attached VI.

 

 

0 Kudos
Message 6 of 7
(893 Views)

I understand. This solved it. Thank you everyone

0 Kudos
Message 7 of 7
(861 Views)