GefObjects.AddButton (method)

Creates and returns a new object in this container.
Syntax: Set GefObject = object.AddButton ( Left, Top, Width, Height, Text )
Parameters:
Optional Left As long -
Optional Top As long -
Optional Width As long -
Optional Height As long -
Optional Text As String -
Description: The AddButton method adds a new button object to the current container.

Example:

Sub GefObjects_AddButton()
    
    Dim oCimScr As GefScreen
    Dim oCimObj As GefObject
    Dim oCimObjs As GefObjects
    Dim oCimBtnObj As GefObject
    
    Set oCimScr = CimGetScreen
    Set oCimObj = oCimScr.Object
    Set oCimObjs = oCimObj.Objects
    Set oCimBtnObj = oCimObjs.AddButton(120 * 20, 120 * 20, 120 * 20, 120 * 20, "New Button")
    oCimScr.Refresh False
    
End Sub