LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Highlight active row in a listbox and auto. scrollbar position

Solved!
Go to solution

How can I automatically highlight the the active row in a listbox and scroll automatically the vertical scrollbar to the (last) active position?

 

thanks

 

 

 

0 Kudos
Message 1 of 10
(6,876 Views)

Not sure I get what you're trying to do. You have to set the Edit Position, not the Active Cell. Also, you need to set the row for the "Top Left Visible Cell" to the current iteration value, not the next one (i.e., before the Increment operation in your code).

 

Why are you using a control as as indicator? In this case this is poor programming. Also, you do not need to use those local variables - just use the loop's iteration terminal!

Message Edited by smercurio_fc on 12-31-2009 10:20 PM
0 Kudos
Message 2 of 10
(6,863 Views)

The problem is that the vertical scrollbar does not scroll down with the entries in the listbox. Therefore you need to scroll up manually. It was not really working with the

"Top Left Visible Cell". How can I solve it?

 

 

 

0 Kudos
Message 3 of 10
(6,849 Views)
hope the attached vi will help you... You may have to make certain changes like closing reference and things like that
Regards
Guru (CLA)
0 Kudos
Message 4 of 10
(6,843 Views)

Hi

thanks for your reply... Well I am not sure if this is the solution for my problem. I think there must be a simple solution which can be used with one of the existing propertie entries 

for the listbox. If I click with the mouse in the last active cell, the vertical scrollbar will automatically follow with the last active cell - otherwise not. I just dont know how to set this

behaviour in the block diagram.

 

regards

0 Kudos
Message 5 of 10
(6,837 Views)

I'm sorry, but I honestly don't understand what you're trying to do. You first said

 


How can I automatically highlight the the active row in a listbox and scroll automatically the vertical scrollbar to the (last) active position?

Then you said:


The problem is that the vertical scrollbar does not scroll down with the entries in the listbox. Therefore you need to scroll up manually. It was not really working with the

"Top Left Visible Cell".


where you talked about scrolling down and scrolling up. Which are you trying to do?

 

Then you said: 


If I click with the mouse in the last active cell, the vertical scrollbar will automatically follow with the last active cell - otherwise not.

So now you're talking about clicking on the last active cell and having the vertial scrollbar follow the "last active cell", though I'm not sure that your definition of "last active cell" follows the LabVIEW definition.

 

 

90% of the effort in solving a problem is defining it, and I can't provide the other 10% because I'm still trying to figure out the definition of the problem.

 

 

 

0 Kudos
Message 6 of 10
(6,831 Views)

It seems to be a difficult task.. Anyway I try to explain again. If you run the attached .vi it is easier to understand where the problem is. If you take a look on the listbox you

easily see that the vertical scrollbar is not in the same position as the last entry off the listbox. In other words u need to scroll the vertical scrollbar manually. How can I solve

the problem that the I can always see the last (active) entry of the listbox without scrolling down manually?

 

regards

0 Kudos
Message 7 of 10
(6,825 Views)
Solution
Accepted by topic author Norick_17
How about the attached modification?
Message 8 of 10
(6,818 Views)

Yes this is (almost) the solution because there is a problem for the first few row because of a negative value for the propertie "value". I have corrected it

and now it works fine.

 

 

thanks for your help!

0 Kudos
Message 9 of 10
(6,810 Views)
You should probably mark the answer from smercurio_fc as the solution and not your thank you. You can change this by clicking on 'Options' above the message body.
0 Kudos
Message 10 of 10
(6,806 Views)