Skip to main content
Participating Frequently
July 14, 2011
Answered

Change initial row displayed in list box

  • July 14, 2011
  • 1 reply
  • 366 views

Hi,

This is in AS2 and should really be quite simple.

I have a populated list box control that may or may not have an item selected.  When the user enters some data in one of the data fields on the screen and then moves to another field,  a database access is performed which returns some data which is used to populate other fields on the screen.

As part of this the item in the list box is selected based upon a code returned from the database.  All so well and good.

However,  I cannot get the list box to move it's 'display window'  to the position of the selected item.  Ie  I want the selected item to become the first item displayed in the list box.  (Note: NOT the first item of the list box....)

What's the property or method I have to use for this ?

Thanks!

Regards

Rich

This topic has been closed for replies.
Correct answer kglad

use the vPosition property of your list component to assign the index of the item you want displayed at the top.

1 reply

kglad
Community Expert
kgladCommunity ExpertCorrect answer
Community Expert
July 14, 2011

use the vPosition property of your list component to assign the index of the item you want displayed at the top.

Rich_z7Author
Participating Frequently
July 15, 2011

Thanks kglad!

kglad
Community Expert
Community Expert
July 15, 2011

you're welcome.