Skip to content

UI.TextField

Name Mandatory Description Default Type
⬅️ Input The value is ignored. None
Output ➡️ The value produced when changed. Any
Variable No The variable that holds the input value. none StringVar(String)
JustifyWidth No Whether to take up all available space for its desired width. Takes priority over Desired Width. false Bool
DesiredWidth No The desired width of the text field. none FloatVar(Float)None
ClipText No Whether to clip the text if it exceeds the width of the text field. Or expand the text field to fit the text. true Bool
Multiline No Support multiple lines. false Bool
Password No Support multiple lines. false Bool
Hint No Hint to show in the text field. none StringVar(String)None
DesiredRows No The desired number of rows to display. none IntVar(Int)None

A widget where text can be entered.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
GFX.MainWindow(Contents: {
  // Setup
  GFX.DrawQueue = ui-draw-queue
  GFX.UIPass(ui-draw-queue) >> render-steps

  // UI
  UI({
    UI.CentralPanel({
      "Hello shards!" >= text
      UI.TextField(text)
    })
  })

  UI.Render(ui-draw-queue)
  GFX.Render(Steps: render-steps)
})

[warning] Context has 4 buffers at release (2 released, 4 kept)
[warning] Context has 5 textures at release (1 released, 5 kept)
 

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
GFX.MainWindow(Contents: {
  // Setup
  GFX.DrawQueue = ui-draw-queue
  GFX.UIPass(ui-draw-queue) >> render-steps

  // UI
  UI({
    UI.CentralPanel({
      "Hello shards!" >= text
      UI.TextField(
        Variable: text
        Multiline: true
      )
    })
  })

  UI.Render(ui-draw-queue)
  GFX.Render(Steps: render-steps)
})

[warning] Context has 4 buffers at release (2 released, 4 kept)
[warning] Context has 5 textures at release (1 released, 5 kept)