Core Function GUIComboBox
(Created page with "<pre> GUIComboBox( <combobox> ) </pre> === Description === Properties & Functions specifically for ComboBox === Parameters === ==== combobox ==== The ComboBox GUI object to ...") |
|||
Line 14: | Line 14: | ||
=== Functions === | === Functions === | ||
+ | |||
+ | Note - Anything is not listed here will most likely be be found in GUIGetProp and GUISetProp or GUIPropInvoke etc this is because a lot of properties and stuf is actually generic for many controls. | ||
==== GetItems ==== | ==== GetItems ==== | ||
Line 73: | Line 75: | ||
==== SelectedIndex ==== | ==== SelectedIndex ==== | ||
− | Returns the index of the currently selected | + | Returns the index of the currently selected index or sets it |
+ | Get: | ||
<syntaxhighlight lang="sputnik"> | <syntaxhighlight lang="sputnik"> | ||
$SelIndex = GUIComboBox( $Combo, "SelectedIndex" ); | $SelIndex = GUIComboBox( $Combo, "SelectedIndex" ); | ||
println("Currently selected index '$SelIndex'"); | println("Currently selected index '$SelIndex'"); | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | Set: | ||
+ | <syntaxhighlight lang="sputnik"> | ||
+ | GUIComboBox( $Combo, "SelectedIndex", 2); | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Line 84: | Line 92: | ||
==== SelectedItem ==== | ==== SelectedItem ==== | ||
− | Returns the currently selected item | + | Returns the currently selected item or sets it |
+ | Get: | ||
<syntaxhighlight lang="sputnik"> | <syntaxhighlight lang="sputnik"> | ||
$SelItem = GUIComboBox( $Combo, "SelectedItem" ); | $SelItem = GUIComboBox( $Combo, "SelectedItem" ); | ||
println("Currently selected item '$SelItem'"); | println("Currently selected item '$SelItem'"); | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | Set: | ||
+ | <syntaxhighlight lang="sputnik"> | ||
+ | GUIComboBox( $Combo, "SelectedItem", "Five"); | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Line 106: | Line 120: | ||
==== SelectionLength ==== | ==== SelectionLength ==== | ||
− | Returns the length of the currently selected text | + | Returns the length of the currently selected text or sets it |
+ | Get: | ||
<syntaxhighlight lang="sputnik"> | <syntaxhighlight lang="sputnik"> | ||
$SelLength = GUIComboBox( $Combo, "SelectionLength" ); | $SelLength = GUIComboBox( $Combo, "SelectionLength" ); | ||
println("Currently selected text length '$SelLength'"); | println("Currently selected text length '$SelLength'"); | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | Set: | ||
+ | <syntaxhighlight lang="sputnik"> | ||
+ | GUIComboBox( $Combo, "SelectionLength", 2 ); | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | Returns 0 is nothing is selected or invalid selection | ||
+ | |||
+ | |||
+ | ==== SelectionStart ==== | ||
+ | |||
+ | Returns the start of the currently selected text or sets it | ||
+ | |||
+ | Get: | ||
+ | <syntaxhighlight lang="sputnik"> | ||
+ | $SelStart = GUIComboBox( $Combo, "SelectionStart" ); | ||
+ | println("Currently selected text start '$SelStart'"); | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | Set: | ||
+ | <syntaxhighlight lang="sputnik"> | ||
+ | UIComboBox( $Combo, "SelectionStart", 1 ); | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Revision as of 07:18, 15 December 2011
GUIComboBox( <combobox> )
Contents |
Description
Properties & Functions specifically for ComboBox
Parameters
combobox
The ComboBox GUI object to use.
Functions
Note - Anything is not listed here will most likely be be found in GUIGetProp and GUISetProp or GUIPropInvoke etc this is because a lot of properties and stuf is actually generic for many controls.
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 index or sets it
Get:
$SelIndex = GUIComboBox( $Combo, "SelectedIndex" ); println("Currently selected index '$SelIndex'");
Set:
GUIComboBox( $Combo, "SelectedIndex", 2);
Returns -1 is nothing is selected or invalid selection
SelectedItem
Returns the currently selected item or sets it
Get:
$SelItem = GUIComboBox( $Combo, "SelectedItem" ); println("Currently selected item '$SelItem'");
Set:
GUIComboBox( $Combo, "SelectedItem", "Five");
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 or sets it
Get:
$SelLength = GUIComboBox( $Combo, "SelectionLength" ); println("Currently selected text length '$SelLength'");
Set:
GUIComboBox( $Combo, "SelectionLength", 2 );
Returns 0 is nothing is selected or invalid selection
SelectionStart
Returns the start of the currently selected text or sets it
Get:
$SelStart = GUIComboBox( $Combo, "SelectionStart" ); println("Currently selected text start '$SelStart'");
Set:
UIComboBox( $Combo, "SelectionStart", 1 );
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.