Core Function GUIComboBox

From Sputnik Wiki
Revision as of 07:09, 15 December 2011 by UberFoX (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
GUIComboBox( <combobox> )

Contents

Description

Properties & Functions specifically for ComboBox

Parameters

combobox

The ComboBox GUI object to use.

Functions

GetItems

Get all the items as an array

$Items = GUIComboBox( $Combo, "GetItems" );
foreach($Items as $i)
{
	println("Item '$i'");
}

SetItems

Set the items from an array

GUIComboBox( $Combo, "SetItems", array("One", "Two", "Three") );

AddItem

Add an item to the item list

GUIComboBox( $Combo, "AddItem", "Four" );

InsertItem

Insert an item to the item list at a given location

GUIComboBox( $Combo, "InsertItem", "Six", 5 );

Returns 1 on success

DelItem

Delete an item from the item list

GUIComboBox( $Combo, "DelItem", "Five" );

DelItemAt

Delete an item from the item list at a given location

GUIComboBox( $Combo, "DelItemAt", 4 );

Returns 1 on success

SelectedIndex

Returns the index of the currently selected item

$SelIndex = GUIComboBox( $Combo, "SelectedIndex" );
println("Currently selected index '$SelIndex'");

Returns -1 is nothing is selected or invalid selection

SelectedItem

Returns the currently selected item

$SelItem = GUIComboBox( $Combo, "SelectedItem" );
println("Currently selected item '$SelItem'");

Returns -1 is nothing is selected or invalid selection

SelectedText

Returns the currently selected text

$SelText = GUIComboBox( $Combo, "SelectedText" );
println("Currently selected text '$SelText'");

Returns empty string is nothing is selected or invalid selection

SelectionLength

Returns the length of the currently selected text

$SelLength = GUIComboBox( $Combo, "SelectionLength" );
println("Currently selected text length '$SelLength'");

Returns 0 is nothing is selected or invalid selection

DropDownStyle

Set the drop down style

GUIComboBox( $Combo, "DropDownStyle", "dropdownlist");

Options:

DropDown
DropDownList
Simple

Returns 0 if failed

Example

Go see GUICreate( "ComboBox" ) for example.

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox