Recent

Author Topic: Obtaining a string from a listbox?  (Read 3907 times)

RS1T

  • New member
  • *
  • Posts: 9
Obtaining a string from a listbox?
« on: March 22, 2012, 02:02:51 pm »
Hi, quick question. How do I assign a the string of a specific item within a listbox to a normal string variable?

Basically, I'm asking how to code the following: String1 := Name of Nth item in Listbox

Thanks

User137

  • Hero Member
  • *****
  • Posts: 1791
    • Nxpascal home
Re: Obtaining a string from a listbox?
« Reply #1 on: March 22, 2012, 03:56:00 pm »
Any item:
Code: [Select]
String1 := ListBox1.items[n];or currently selected item
Code: [Select]
String1 := ListBox1.items[ListBox1.ItemIndex];

 

TinyPortal © 2005-2018