Skip to content

UI.Grid

Name - Description Default Type
<input> The value that will be passed to the Contents shards of the grid. Any
<output> The output of this shard will be its input. Any
Contents The UI contents. None Shard[ Shard ]
Striped Whether to alternate a subtle background color to every other row. false Bool&Bool
MinWidth Minimum column width. None Float&Float
MaxWidth Maximum column width. None Float&Float
Spacing Spacing between columns/rows. None Float2&Float2

Simple grid layout.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
(GFX.MainWindow
 :Contents
 (->
  (Setup
   (GFX.DrawQueue) >= .ui-draw-queue
   (GFX.UIPass .ui-draw-queue) >> .render-steps)
  (UI
   .ui-draw-queue
   (UI.CentralPanel
    (UI.Grid
     :Striped true
     :Contents
     (->
      "Col 1" (UI.Label)
      "Col 2" (UI.Label)
      "Col 3" (UI.Label)
      (UI.NextRow)
      "Hello" (UI.Label)
      "shards" (UI.Label)
      "!" (UI.Label)
      (UI.NextRow)
      "Lorem ipsum dolor sit amet" (UI.Label)
      "consectetur adipiscing elit" (UI.Label)
      "sed do eiusmod tempor" (UI.Label)))))

  (GFX.Render :Steps .render-steps)))