TextInputDialog:setInputType

From GiderosMobile
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Available since: Gideros 2012.8
Class: TextInputDialog

Description

Mostly used on mobile devices. Sets the input (keyboard) type associated with the text field.

TextInputDialog:setInputType(type)

The options are:

Parameters

type: (string) input type associated with the text field

Example

Mobile

local textInputDialog = TextInputDialog.new("my title", "my message", 360, "Cancel", "OK")
textInputDialog:setInputType(TextInputDialog.NUMBER) -- or "number"

local function onComplete(event)
	print(event.text, event.buttonIndex, event.buttonText)
end

textInputDialog:addEventListener(Event.COMPLETE, onComplete)
textInputDialog:show()