Child pages
  • NumberEditor
Skip to end of metadata
Go to start of metadata

This is a sub-class of Widget. A NumberEditor allows the user to input an integer value.

Constructor

mgf.createNumberEditor()

Fields

FieldTypeDescriptionRead/Write
value

Number

This contains the value of the numberEditor.Read / Write

Functions

NumberEditor does not support any additional functions.

Examples 

In this example the NumberEditor is used inside a Dialog. Of course using the Dialog is optional.

 

Example: numberEditor with Dialog
-- Create numberEditor
numberEditor = mgf.createNumberEditor()
 
-- Add the numberEditor to a dialog
dialog = mgf.createDialog( numberEditor, "Input a number", mgf.ModeOKCancel )
-- Create an actionListener for the dialog
 
dialog.actionListener  = function ( widget, action )
  print( "Action: ", action )
  print( "Number: ", numberEditor.value )
end
 
mgf.setWidget( dialog )

 


  • No labels