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

InsertItemAt

ListBox.InsertItemAt(int index, string newitem)
Inserts NEWITEM into the specified list box. The item will be inserted before the specified index.

Listbox indexes go from 0 (the first item) to ItemCount - 1 (the last item). The new item will be inserted before the index you specify.

NOTE: List boxes have a limit of 200 items. If you try to add more than that, this function will return false and the item will not be added.

Example:

lstChoices.AddItem("First item");
lstChoices.AddItem("Second item");
lstChoices.InsertItemAt(1, "Third item");
will insert the Third Item in between the First and Second items.

See Also: ListBox.AddItem, ListBox.RemoveItem


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