GuiWindowIsSizable: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(Created page with "{{Client function}} __NOTOC__ {{New feature/item|3.0156|1.5.6||This function checks if a GUI window is sizable.}} ==Syntax== <syntaxhighlight lang="lua"> bool guiWindowIsSiz...")
 
mNo edit summary
 
(5 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{Client function}}
{{Client function}}
__NOTOC__
__NOTOC__
{{New feature/item|3.0156|1.5.6||This function checks if a GUI window is sizable.}}
{{New feature/item|3.0156|1.5.5|13823|This function checks if a GUI window is sizable.}}


==Syntax==  
==Syntax==  
Line 7: Line 7:
bool guiWindowIsSizable ( gui-window guiWindow )
bool guiWindowIsSizable ( gui-window guiWindow )
</syntaxhighlight>  
</syntaxhighlight>  
 
[[File:Sizable.png|thumb|a sizeable GUI]]
{{OOP|||sizable|guiWindowSetSizable}}
===Required Arguments===  
===Required Arguments===  
*'''guiWindow:''' the window to check the sizable flag of
*'''guiWindow:''' the window to check the sizable flag of
Line 13: Line 14:
===Returns===
===Returns===
Returns ''true'' if the window is sizable, ''false'' if not, ''nil'' if an invalid window was provided.
Returns ''true'' if the window is sizable, ''false'' if not, ''nil'' if an invalid window was provided.


==Example==  
==Example==  

Latest revision as of 14:20, 27 April 2020

This function checks if a GUI window is sizable.

Syntax

bool guiWindowIsSizable ( gui-window guiWindow )
a sizeable GUI

OOP Syntax Help! I don't understand this!

Variable: .sizable
Counterpart: guiWindowSetSizable


Required Arguments

  • guiWindow: the window to check the sizable flag of

Returns

Returns true if the window is sizable, false if not, nil if an invalid window was provided.


Example

addEventHandler( "onClientResourceStart", resourceRoot,
    function( )
        local window = guiCreateWindow( 0.5, 0.5, 0.22, 0.22, "isSizable window", true )
        guiWindowSetSizable( window, false ) -- make it unsizable
        addCommandHandler( "isSizable",
            function( )
                local sizable = guiWindowIsSizable( window ) -- check the window sizable flag
                outputChatBox( "Window is " .. ( sizable and "sizable" or "unsizable" ) ) -- show info about the window
            end
        )
    end
)

See Also

General functions

Browsers

Buttons

Checkboxes

Comboboxes

Edit Boxes

Gridlists

Memos

Progressbars

Radio Buttons

Scrollbars

Scrollpanes

Static Images

Tab Panels

Tabs

Text Labels

Windows

Input

GUI