Skip to content

UI.Combo

Name - Description Default Type
<input> A sequence of values. [Any]
<output> The selected value. Any
Label The text label of this combobox. None String
Index The index of the selected item. None Int&Int
Width The width of the button and menu. None Float&Float
Style The text style. None {Any}&{Any}

A drop-down selection menu with a label.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
(GFX.MainWindow
 :Contents
 (->
  (Setup
   (GFX.DrawQueue) >= .ui-draw-queue
   (GFX.UIPass .ui-draw-queue) >> .render-steps)
  (UI
   .ui-draw-queue
   (UI.CentralPanel
    (->
     ["α Α" "ω Ω"]
     (UI.Combo
      :Label "Greek letter"
      :Index .index)
     (ExpectString) >= .letter)))

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

 

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
(GFX.MainWindow
 :Contents
 (->
  (Setup
   (GFX.DrawQueue) >= .ui-draw-queue
   (GFX.UIPass .ui-draw-queue) >> .render-steps)
  (UI
   .ui-draw-queue
   (UI.CentralPanel
    (->
     ["α Α" "ω Ω"]
     (UI.Combo
      :Label "Greek letter"
      :Style {:color (color 200 10 200)}
      :Index .index)
     (ExpectString) >= .letter)))

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