Developer   API   User Interface   Form

  •  Config(0)
  •  Properties(22)
  •  Methods(29)
  •  Events(9)

Form : StaticContainer

Application form class.

Properties

  • bg : BGDrawing
    Background drawing, it holds instance of BGDrawing to decorate background.
  • bgPressed : BGDrawing
  • border : Drawing
    Border drawing, it holds instance of Drawing to decorate border.
  • clipToBounds : Boolean
    Set/Get if the view is not clipped to its bounds.
  • defaults : Object
    Sets default controls options.
  • detach : UIX.View
    Remove this view form it's parent.
  • fg : TextDrawing
    Foreground drawing, it holds instance of TextDrawing object to decorate text of Control.
  • fgPressed : TextDrawing
  • height : Integer
    Height of the Control (in pixels).
  • initialisation : Boolean
    Initialisation in progress.
  • layout : StackLayout
    StackLayout used to layout elements into the object.
  • left : Integer
    X - coordinates of Control's position.
  • name : String
    Name of the Control.
  • native : Any
    Native, instance of native UI object(View,ScrollView,Window).
  • options : Object
    Position of navigation bar.
  • parent : Any
    Parent, instance of native UI object where current Control is assigned. Basicaly is a container where control was added.(View,ScrollView,>Window)
  • skipDrawing : Boolean
    Skip control drawing. It used if control is part of composite control what manage drawing bu itself.
  • stretch : Symbol
    Gets or sets if the view's width is stretchable.
  • this
    Construct of the object calls following method in order.
  • top : Integer
    Y - coordinates of control's position.
  • visible : Boolean
    Visibility of the Control. Default is True.
  • width : Integer
    Width of the Control (in pixels).

Methods

  • add(control,order = #front)
    Add Control to container.
  • afterInit()
    After Init Control, set control defaults from current theme setting.
  • afterInitControls
    Method is executed after init controls.
  • beforeInit()
    After Init Control, set control defaults from current theme setting.
  • beforeInitControls
    Method is executed before init controls.
  • find(name) : Control
    Search for child Controls, which name is same as name from function's param.
  • focusable() : Boolean
    Ability to have a focus.
  • getChildrenBounds() : MultiValue
    Returns four values (left, top, right, bottom) of child's union content.
  • getChildrenSize() : MultiValue
    Returns two values (width, height) of child's union content.
  • getControlByName(n) : Object
    Get controls by name.
  • hasFocus() : Boolean
    Returns true if this Control has focus. Otherwise, function returns false.
  • icon(width, height) : Control
    Icon, other way how o set control image. It accept symbol of vector, location to bitmap, instance of bitmap or instance of path. This property can be used only if image is defined.
  • init() : Form
    Init form controls, it sets width, height to system variables.
  • invalidate()
    This function ensure redrawing a rectangle, determined by parameters. Redrawing manages the function, which is set to onDraw event.
  • isControl(n) : Boolean
    Check if control exists in form.
  • onActivate(sender) : Fucntion
    Called when form is activated.
  • onDeactivate(sender) : Fucntion
    Called when form is deactivated.
  • performLayout()
    Performs (force) layout calculations.
  • raiseOnActivate()
    Function executed on form activation.
  • raiseOnDeactivate()
    Function executed on form deactivation.
  • removeAll()
    Remove all child controls from container.
  • resumeLayout()
    Resume layer's recalculating.
  • setControlValueByName(n,v)
    Set value of control by name.
  • setData(d)
    Set all values in view, data must be an JSON object with format { name: value, name1:value1 ...}. Name of the controls and JSON object keys must be equal to make this funcion work
  • setFocus() : Control
    Function sets focus to the Control.
  • setLocation(left, top) : Control
    Function to set control left and top position.
  • setSize(width, height) : Control
    Function to set width and hight of control.
  • suspendLayout()
    Pause layer's recalculating.
  • undefined(k,v)
    Make controls availaible as property of current form.

Events

  • onChar(sender,charCode) : Function
    This event is raised by release an UNICODE character key.
  • onDraw(sender,canvas) : Function
    This event occurs, when it is necessary to redraw object. onDraw event is usually managed by skin.
  • onKeyPressed(sender,key) : Function
    This event is raised by press the key.
  • onKeyReleased(sender,key) : Function
    This event is raised by release the key.
  • onPointerDragged(sender,x,y) : Function
    Called when touch (click) is moved.
  • onPointerPressed(sender,x,y) : Fucntion
    Called when touch (click) is stared.
  • onPointerReleased(sender,x,y) : Function
    Called when touch (click) is finished.
  • onProcess : Function
    Callback function, which is called from the object every 25ms.
  • onResize(sender,charCode) : Function
    Occurs when the control is resized.