Skip to content

UI.ScrollArea

Name - Description Default Type
<input> The value that will be passed to the Contents shards of the scroll area. Any
<output> The output of this shard will be its input. Any
Contents The UI contents. None Shard[Shard]
Horizontal Enable horizontal scrolling. false Bool
Vertical Enable vertical scrolling. true Bool
AlwaysShow Always show the enabled scroll bars even if not needed. false Bool

Add vertical and/or horizontal scrolling to a contained UI.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
(def lorem_ipsum
  "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.")

(GFX.MainWindow
 :Width 480 :Height 320
 :Contents
 (->
  (Setup
   (GFX.DrawQueue) >= .ui-draw-queue
   (GFX.UIPass .ui-draw-queue) >> .render-steps)
  (UI
   .ui-draw-queue
   (UI.CentralPanel
    (UI.ScrollArea
     :Horizontal true
     :Contents
     (->
      lorem_ipsum (UI.Label :Wrap false)))))

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