Back

CreateCodeEdit

CodeEdit creates a CodeEdit object which is a control for premium users similar to TextEdit but with advanced methods.

app.CreateCodeEdit( text, width, height, options ) -> app object - CodeEdit

The following methods are avaiable on the CodeEdit object:

  Copy()
  Cut()
  Destroy()
  Explode()
  Focus()
  GetAbsHeight() -> number - integer
  GetAbsWidth() -> number - integer
  GetCursorLine() -> number - integer
  GetCursorPos() -> number - integer
  GetHeight( options ) -> number - fraction of screen height
  GetLeft( options ) -> number - fraction of screen width
  GetLineStart( line ) -> number - integer
  GetPosition( options ) -> object - { left: fraction of parent width, top: fraction of parent height, right: fraction of parent width, bottom: fraction of parent height }
  GetSelectMode() -> boolean
  GetSelectedText() -> string
  GetText() -> string
  GetTop( options ) -> number - fraction of screen height
  GetType() -> string - "CodeEdit"
  GetVisibility() -> string - "Show" or "Hide" or "Gone"
  GetWidth( options ) -> number - fraction of screen width
  Gone()
  Hide()
  IsEnabled() -> boolean
  IsOverlap( obj, depth ) -> boolean
  IsVisible() -> boolean
  Paste()
  Redo()
  Release()
  Replace( text )
  SelectAll()
  SetScale( x, y )
  SetText( txt )
  Show()
  Undo()
  id -> string - "#id"

string
number - fraction of screen width
number - fraction of screen height
unknown
number
set color effects
?
clear actions for undo/redo
copy selected text
cut selected text
destroys object
destroys object with explode animation and sound
?
get height in pixels
get width in pixels
GetCursorLine
GetCursorPos
get screen relative height
get distance to left parent border
number - integer
? from which line?
GetSelectMode
GetSelectedText
GetText
get distance to upper parent border
GetType
GetVisibility
get screen relative width
Set visibility "Gone"
Set visibility "Hide"
HighlightLine
InsertText
IsEnabled
app object
return wether obj overlap with an other
IsVisible
selected text
redo undone action
?
why theres no replace text arg?
boolean
ReplaceText
string - "Up" or "Down" or "?"
SelectAll
string -
  hexadecimal: "#rrggbb", "#aarrggbb"
  colourName: "red", "green", ...
SetBackColor
SetBackColorRadial
string - path to file or folder ( "/absolute/..." or "relative/..." )
changes the background image
string - "Add" or "Multiply" or "?"
adjust color
?
SetCursorPos
en/disable object
allows using str_html formatting
?
move object from current position
function()
called when text changed
function()
called when double pressed yoyo
function( action, keyname, keycode, ? )
called when device key pressed
set surrounding borders
SetPosition
number - factor
SetScale
en/disable text selection
SetSelection
change object size
SetText
SetTextColor
SetTextSize
en/disable android standard keyboard
string - "Show" or "Hide" or "Gone"
change visibility mode
Set visibility "Show"
?
undo action
object id