Skip to content
AR2000AR edited this page Jul 21, 2023 · 3 revisions

Frame(Widget)

Basic widget container. At least one is needed to use widgets.

Frame([parentFrame:Frame],[x:number,y:number]):Frame

Parameters :

  • parentFrame:Frame - parent frame
  • x:number - x position relative to the parent frame or absolute on screen if parentFrame is nil
  • y:number - y position relative to the parent frame or absolute on screen if parentFrame is nil

Return :

  • Frame

frame:closeListeners()

Unregister the events listener for the frame. This is only needed for the root frame and should be done before the application close.

frame:removeChild(child:Widget)

Remove a widget from the Frame.

Parameters :

  • child:Widget - the widget you want to remove

frame:backgroundColor([backgroundColor:number])

Getter and setter for the frame's background color. If backgroundColor is set, the background color will be updated. Return the old or background color.
Default is transparent.

Parameters :

  • backgroundColor:number - The background RGB color (eg 0x0000ff)

Return :

  • backgroundColor

frame:doubleTouchDelay(value)

Getter and setter for the maximum delay between two consecutive touch event to trigger a double_touch event.
Default is 0.5s

Parameters :

  • value:number - The delay in seconds

Return :

  • value:number - the old or current delay

Clone this wiki locally