User Tools

Site Tools


Sidebar

Introduction

* Home

Documentation & help

LibreCAD Community

Help on DokuWiki

Temporary shorcuts

dev:v3:gui_api:dialog:inputgui3

This is an old revision of the document!


Input GUI Widgets III


Text GUI Class


Github Link

 namespace lc::ui::api 

The Text GUI widget allows the user to enter data in a text format.


Constructor


Description

Constructs an Text GUI widget.

Examples

  •  local text1 = gui.Text("Text1") 

Get and Set Values


Description

Used to get and set the desired value for the text widget. Data of type string is returned.

Examples

  •  local textval = text1:value() 
  •  text1:setValue("SomeText") 

Add Finish Callback


Description

Add a finish callback which is called when the user presses enter after entering the text or clicks somewhere else and the input gui loses focus. This is different from the dialog widget finish callback.

Examples

  •  text1:addFinishCallback(function() message("Finished entering text") end) 

Add On Change Callback


Description

Add an on change callback which is called when the user types anything i.e. on any change to the text input.

Examples

  •  text1:addOnChangeCallback(function(newtext) message(tostring(newtext)) end) 

dev/v3/gui_api/dialog/inputgui3.1594306609.txt.gz · Last modified: 2020/07/09 14:56 by jedi18