12-31-2009 12:04 PM
How can I automatically highlight the the active row in a listbox and scroll automatically the vertical scrollbar to the (last) active position?
thanks
Solved! Go to Solution.
12-31-2009 10:19 PM - edited 12-31-2009 10:20 PM
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!
01-01-2010 02:46 AM
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?
01-01-2010 03:21 AM
01-01-2010 05:24 AM
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
01-01-2010 08:11 AM
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.
01-01-2010 09:12 AM
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
01-01-2010 09:51 AM
01-01-2010 10:45 AM
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!
01-01-2010 10:49 AM