Difference between revisions of "GuiFocus"

From Multi Theft Auto: Wiki
Jump to: navigation, search
m
(Example)
 
(One intermediate revision by the same user not shown)
Line 16: Line 16:
  
 
==Example==  
 
==Example==  
{{Example}}
+
<syntaxhighlight lang="lua">
 +
local edit= guiCreateMemo ( 0.4, 0.4, 0.4, 0.08, "it's edit!", true )
 +
guiFocus(edit)
 +
</syntaxhighlight>
  
 
==See Also==
 
==See Also==
 
{{GUI_functions}}
 
{{GUI_functions}}
 
{{GUI_events}}
 
{{GUI_events}}

Latest revision as of 17:14, 7 July 2019

FROM VERSION 1.5.6 r16361 ONWARDS
This function focuses a defocused GUI element. Used primarily for edit fields and memos.

Syntax

bool guiFocus ( element guiElement )

OOP Syntax Help! I don't understand this!

Method: GuiElement:focus(...)

Required Arguments

  • guiElement: the GUI element that you want to focus

Returns

Returns true if the function was successful, false otherwise.

Example

local edit= guiCreateMemo ( 0.4, 0.4, 0.4, 0.08, "it's edit!", true )
guiFocus(edit)

See Also

General functions

FROM VERSION 1.5.6 r16361 ONWARDS

Browsers

Buttons

Checkboxes

Comboboxes

Edit Boxes

Gridlists

FROM VERSION 1.5.6 r16204 ONWARDS

Memos

Progressbars

Radio Buttons

Scrollbars

Scrollpanes

Static Images

Tab Panels

Tabs

Text Labels

Windows

Input

GUI