spacer graphic
spacer graphic
Montage of games AGS Logo
spacer graphic

 

spacer graphic
Menu
spacer graphic Home
About
News
Features
Download AGS
spacer graphic Games 
Games main page
Award Winners
Picks of the month
Short games
Medium length games
Full length games
In Production
Hints & Tips
Community
Forums
AGSers World Map
Member websites
Chat
Resources
Tutorials
FAQ
Knowledge Base
Downloads
Links
AGS-related links
* AGS Manual
  * Scripting
    * GUI List Box functions and properties

Items property

(Formerly known as ListBoxGetItemText, which is now obsolete)
(Formerly known as ListBox.GetItemText, which is now obsolete)
(Formerly known as ListBox.SetItemText, which is now obsolete)

String ListBox.Items[index]
Gets/sets the text of the list box item at INDEX.

List box items are numbered starting from 0, so the first item is 0, the second is 1, and so on. The highest allowable index is ItemCount minus 1.

If you want to add a new item to the listbox, use the ListBox.AddItem method.

Example:

String selectedItemText = lstOptions.Items[lstOptions.SelectedIndex];
will get the text of the selected item in the list box.

See Also: ListBox.SelectedIndex, ListBox.ItemCount, ListBox.AddItem


User comments and notes
There are currently no user comments on this page.
The user comment facility is currently disabled.