func CreateEditField(parent Control, width int, text string, scale int) *EditField {
	e := new(EditField)
	e.BaseControl = NewBaseControl()
	e.onChange = nil
	e.SetTitle(text)
	e.SetEnabled(true)

	if width == AutoSize {
		width = xs.Len(text) + 1
	}

	e.SetSize(width, 1)
	e.cursorPos = xs.Len(text)
	e.offset = 0
	e.parent = parent
	e.readonly = false
	e.SetScale(scale)

	e.SetConstraints(width, 1)

	e.end()

	if parent != nil {
		parent.AddChild(e)
	}

	return e
}
func CreateEditField(parent Control, width int, text string, scale int) *EditField {
	e := new(EditField)
	e.BaseControl = NewBaseControl()
	e.onChange = nil
	e.SetTitle(text)
	e.SetEnabled(true)

	if width == AutoSize {
		width = xs.Len(text) + 1
	}

	e.SetSize(width, 1)
	e.cursorPos = xs.Len(text)
	e.offset = 0
	e.parent = parent
	e.readonly = false
	e.SetScale(scale)

	e.SetConstraints(width, 1)

	e.end()

	if parent != nil {
		parent.AddChild(e)
	}

	return e
}
func CreateEditField ( parent Control , width int , text string , scale int ) * EditField { e := new ( EditField ) e . BaseControl = NewBaseControl ( ) e . onChange = nil e . SetTitle ( text ) e . SetEnabled ( true ) if width == AutoSize { width = xs . Len ( text ) + 1 } e . SetSize ( width , 1 ) e . cursorPos = xs . Len ( text ) e . offset = 0 e . parent = parent e . readonly = false e . SetScale ( scale ) e . SetConstraints ( width , 1 ) e . end ( ) if parent != nil { parent . AddChild ( e ) } return e }
// NewEditField creates a new EditField control
// view - is a View that manages the control
// parent - is container that keeps the control. The same View can be a view and a parent at the same time.
// width - is minimal width of the control.
// text - text to edit.
// scale - the way of scaling the control when the parent is resized. Use DoNotScale constant if the
//  control should keep its original size.
NewEditField creates a new EditField control view - is a View that manages the control parent - is container that keeps the control . The same View can be a view and a parent at the same time . width - is minimal width of the control . text - text to edit . scale - the way of scaling the control when the parent is resized . Use DoNotScale constant if the control should keep its original size .