ListBox Currently Displayed Item

Discussion in 'Software' started by ceal21c, May 3, 2006.

  1. ceal21c

    ceal21c Private E-2

    Hey Guys,

    I have a list box that displays a directory of files, I would like to display data associated with the currently highlighted file in the list box using a label or text box. How can I determine which item is highlighted?
     
  2. foogoo

    foogoo Major "foogoo" Geek

    VB, I guess?
     
  3. ceal21c

    ceal21c Private E-2

    My question was poorly worded. I have a string array, StringArray (0 to 3) and a listbox, LstBox. I want to assign StringArray 0 the value of ListBox 0. What is the correct syntax:confused: ?
     
  4. ceal21c

    ceal21c Private E-2

    Found the soloution on another site hope this helps someone:

    StringArray(0) =LstBox.Index(0).Text

    The .Text is not required as that is the default, but it is a good idea
    to use it.
     

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds