Core Function GUICreateTextBoxEx
From Sputnik Wiki
(Difference between revisions)
(Created page with "<pre> GUICreate( "TextBoxEx", <gui object>, <Text>, <Left>, <Top>, <Width>, <Height> ) </pre> === Description === Create a Multiline TextBox === Parameters === ==== gui objec...") |
m (1 revision) |
||
(2 intermediate revisions by one user not shown) | |||
Line 42: | Line 42: | ||
<syntaxhighlight lang="sputnik"> | <syntaxhighlight lang="sputnik"> | ||
// Create the GUI | // Create the GUI | ||
− | + | Global $GUI = GUICreate("Window", "Hello", 550, 350); | |
// Show the GUI | // Show the GUI | ||
GUILoad( $GUI ); | GUILoad( $GUI ); | ||
// Create a TextBoxEx | // Create a TextBoxEx | ||
− | + | Global $Obj = GUICreate("TextBoxEx", $GUI, "My TextBox", 8, 8, 300, 300); | |
// Create a link | // Create a link | ||
GUILink($Obj, "TextChanged", 'onChange( $me );'); | GUILink($Obj, "TextChanged", 'onChange( $me );'); |
Latest revision as of 12:37, 14 June 2015
GUICreate( "TextBoxEx", <gui object>, <Text>, <Left>, <Top>, <Width>, <Height> )
Contents |
Description
Create a Multiline TextBox
Parameters
gui object
The GUI object to place the Multiline TextBox on.
text
The text the button should display.
left
LEFT Position to create the object.
top
TOP Position to create the object.
width
Optional; The width of the object.
height
Optional; The height of the object.
Return Value
Success: Returns the new GUI object.
Failure: Returns 0 if error occurs.
Remarks
None.
Example
// Create the GUI Global $GUI = GUICreate("Window", "Hello", 550, 350); // Show the GUI GUILoad( $GUI ); // Create a TextBoxEx Global $Obj = GUICreate("TextBoxEx", $GUI, "My TextBox", 8, 8, 300, 300); // Create a link GUILink($Obj, "TextChanged", 'onChange( $me );'); // Keep the GUI running as long as long as the window is open While ( GUIStatus( $GUI ) ) DoEvents( ); Function onChange( $obj ) { my $Text = GUIGetProp($obj, "Text"); println("Text: $Text"); }