Difference between revisions of "Lua:Class:Panel"

From Cheat Engine
Jump to navigation Jump to search
 
Line 2: Line 2:
 
'''Panel Class''': (Inheritance: ''[[WinControl]]''->''[[Control]]''->''[[Component]]''->''[[Object]]'')
 
'''Panel Class''': (Inheritance: ''[[WinControl]]''->''[[Control]]''->''[[Component]]''->''[[Object]]'')
  
 +
Represents a Panel control that can be used as a container for other controls in Cheat Engine forms.
  
createPanel(owner): Creates a Panel class object which belongs to the given owner. Owner can be any object inherited from WinControl
+
===Creation===
 +
<pre>
 +
createPanel(owner)
 +
</pre>
 +
Creates a Panel object which belongs to the given owner.
 +
Owner can be any object inherited from WinControl.
  
== Properties ==
+
===Properties===
; Alignment: alignment
+
{|width="85%" cellpadding="10%" cellspacing="0" border="0"
; BevelInner: panelBevel
+
!align="left"|Property
; BevelOuter: panelBevel
+
!align="left"|Type
; BevelWidth: Integer
+
!style="width: 80%;background-color:white;" align="left"|Description
; FullRepaint: boolean
+
|-
 +
|Alignment
 +
|alignment
 +
|Specifies the alignment of the panel within its parent.
 +
|-
 +
|BevelInner
 +
|panelBevel
 +
|Specifies the inner bevel style of the panel.
 +
|-
 +
|BevelOuter
 +
|panelBevel
 +
|Specifies the outer bevel style of the panel.
 +
|-
 +
|BevelWidth
 +
|Integer
 +
|Width of the bevel.
 +
|-
 +
|FullRepaint
 +
|Boolean
 +
|If true, the panel is fully repainted when updated.
 +
|}
  
== Methods ==
+
===Methods===
; getAlignment() : gets the alignment property
+
{|width="85%" cellpadding="10%" cellspacing="0" border="0"
; setAlignment(alignment) : sets the alignment property
+
!align="left"|Method
; getBevelInner()
+
!align="left"|Parameters
; setBevelInner(PanelBevel)
+
!align="left"|Returns
; getBevelOuter()
+
!style="width: 80%;background-color:white;" align="left"|Description
; setBevelOuter(PanelBevel)
+
|-
; getBevelWidth()
+
|getAlignment
; setBevelWidth(BevelWidth)
+
|None
; getFullRepaint()
+
|alignment
; setFullRepaint(boolean)
+
|Gets the alignment property.
 +
|-
 +
|setAlignment
 +
|alignment
 +
|None
 +
|Sets the alignment property.
 +
|-
 +
|getBevelInner
 +
|None
 +
|panelBevel
 +
|Gets the inner bevel style.
 +
|-
 +
|setBevelInner
 +
|panelBevel
 +
|None
 +
|Sets the inner bevel style.
 +
|-
 +
|getBevelOuter
 +
|None
 +
|panelBevel
 +
|Gets the outer bevel style.
 +
|-
 +
|setBevelOuter
 +
|panelBevel
 +
|None
 +
|Sets the outer bevel style.
 +
|-
 +
|getBevelWidth
 +
|None
 +
|Integer
 +
|Gets the bevel width.
 +
|-
 +
|setBevelWidth
 +
|Integer
 +
|None
 +
|Sets the bevel width.
 +
|-
 +
|getFullRepaint
 +
|None
 +
|Boolean
 +
|Gets the FullRepaint property.
 +
|-
 +
|setFullRepaint
 +
|Boolean
 +
|None
 +
|Sets the FullRepaint property.
 +
|}
  
 +
===Examples===
 +
<pre>
 +
-- Create a panel and set some properties
 +
local form = createForm()
 +
local panel = createPanel(form)
 +
panel.Align = "alTop"
 +
panel.BevelInner = "bvRaised"
 +
panel.BevelOuter = "bvLowered"
 +
panel.BevelWidth = 2
 +
panel.FullRepaint = true
 +
</pre>
  
 
{{LuaSeeAlso}}
 
{{LuaSeeAlso}}

Latest revision as of 00:44, 11 July 2025

Panel Class: (Inheritance: WinControl->Control->Component->Object)

Represents a Panel control that can be used as a container for other controls in Cheat Engine forms.

Creation[edit]

createPanel(owner)

Creates a Panel object which belongs to the given owner. Owner can be any object inherited from WinControl.

Properties[edit]

Property Type Description
Alignment alignment Specifies the alignment of the panel within its parent.
BevelInner panelBevel Specifies the inner bevel style of the panel.
BevelOuter panelBevel Specifies the outer bevel style of the panel.
BevelWidth Integer Width of the bevel.
FullRepaint Boolean If true, the panel is fully repainted when updated.

Methods[edit]

Method Parameters Returns Description
getAlignment None alignment Gets the alignment property.
setAlignment alignment None Sets the alignment property.
getBevelInner None panelBevel Gets the inner bevel style.
setBevelInner panelBevel None Sets the inner bevel style.
getBevelOuter None panelBevel Gets the outer bevel style.
setBevelOuter panelBevel None Sets the outer bevel style.
getBevelWidth None Integer Gets the bevel width.
setBevelWidth Integer None Sets the bevel width.
getFullRepaint None Boolean Gets the FullRepaint property.
setFullRepaint Boolean None Sets the FullRepaint property.

Examples[edit]

-- Create a panel and set some properties
local form = createForm()
local panel = createPanel(form)
panel.Align = "alTop"
panel.BevelInner = "bvRaised"
panel.BevelOuter = "bvLowered"
panel.BevelWidth = 2
panel.FullRepaint = true

See also[edit]