Lazarus
Home
Help
TinyPortal
Search
Login
Register
Lazarus
»
Forum
»
Programming
»
General
»
Obtaining a string from a listbox?
Free Pascal
Website
Downloads
Wiki
Documentation
Bugtracker
Mailing List
Lazarus
Website
Downloads (Laz+FPC)
Packages (OPM)
FAQ
Wiki
Documentation (RTL/FCL/LCL)
Bugtracker
CCR Bugs
GIT
Mailing List
Other languages
Foundation
Website
Useful Wiki Links
Project Roadmap
Getting the Source
Screenshots
How to use the forum
Forum Rules
About donations (wiki)
Bookstore
Computer Math and Games in Pascal
(preview)
Lazarus Handbook
« previous
next »
Print
Pages: [
1
]
Author
Topic: Obtaining a string from a listbox? (Read 4623 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
Logged
User137
Hero Member
Posts: 1791
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];
Logged
Print
Pages: [
1
]
« previous
next »
Lazarus
»
Forum
»
Programming
»
General
»
Obtaining a string from a listbox?
TinyPortal
© 2005-2018