[tekui-devel] Password input field

Timm S. Mueller tmueller at schulze-mueller.de
Fri Jul 5 16:59:17 CEST 2013


On Fri, 5 Jul 2013 16:26:09 +0200
Stefan Reich <stefan.reich.maker.of.eye at googlemail.com> wrote:

> I would like to use tekUI to enter a password... naturally, that means the
> characters entered should not be displayed (just stars instead).
> 
> Is it possible?

Yes:

local PassTextInput = ui.TextInput:newClass { }

function PassTextInput:draw()
  local temp = self.TextBuffer
  self.TextBuffer = ("*"):rep(temp:len())
  local res = ui.TextInput.draw(self)
  self.TextBuffer = temp
  return res
end

- Timm

-- 
Timm S. Mueller <tmueller at schulze-mueller.de>
Schulze & Mueller GbR, Jungstr. 2, 10247 Berlin,
Gesellschafter: Franciska Schulze, Timm S. Mueller,
Tel. +49 30 85610000, http://www.schulze-mueller.de/


More information about the tekui-devel mailing list