Difference between revisions of "TextInputDialog:setSecureInput"

From GiderosMobile
m (Text replacement - "</source>" to "</syntaxhighlight>")
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
<languages />
+
'''Available since:''' Gideros 2012.8<br/>
'''<translate>Available since</translate>:''' Gideros 2012.8<br/>
+
'''Class:''' [[TextInputDialog]]<br/>
'''<translate>Class</translate>:''' [[Special:MyLanguage/TextInputDialog|TextInputDialog]]<br/>
+
 
=== <translate>Description</translate> ===
+
=== Description ===
<translate><br />
+
Sets whether the text object should hide the text being entered.
Sets whether the text object should hide the text being entered.<br />
 
<br /></translate>
 
 
<syntaxhighlight lang="lua">
 
<syntaxhighlight lang="lua">
TextInputDialog:setSecureInput(secureInput)
+
TextInputDialog:setSecureInput(secureInput)
 +
</syntaxhighlight>
 +
 
 +
=== Parameters ===
 +
'''secureInput''': (boolean) if true, the text object hides the text being entered<br/>
 +
 
 +
=== Example ===
 +
'''Mobiles and desktops'''
 +
<syntaxhighlight lang="lua">
 +
local textInputDialog = TextInputDialog.new("my title", "my message", "mysecretpw", "Cancel", "OK")
 +
textInputDialog:setSecureInput(true)
 +
 
 +
local function onComplete(event)
 +
print(event.text, event.buttonIndex, event.buttonText)
 +
end
 +
 
 +
textInputDialog:addEventListener(Event.COMPLETE, onComplete)
 +
textInputDialog:show()
 
</syntaxhighlight>
 
</syntaxhighlight>
=== <translate>Parameters</translate> ===
 
'''secureInput''': (boolean) <translate>If &#039;true&#039;, the text object hides the text being entered.</translate> <br/>
 
  
 
{{TextInputDialog}}
 
{{TextInputDialog}}

Latest revision as of 20:54, 4 November 2024

Available since: Gideros 2012.8
Class: TextInputDialog

Description

Sets whether the text object should hide the text being entered.

TextInputDialog:setSecureInput(secureInput)

Parameters

secureInput: (boolean) if true, the text object hides the text being entered

Example

Mobiles and desktops

local textInputDialog = TextInputDialog.new("my title", "my message", "mysecretpw", "Cancel", "OK")
textInputDialog:setSecureInput(true)

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

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