Skip to content

Instantly share code, notes, and snippets.

@iani
Created July 17, 2013 16:41
Show Gist options
  • Save iani/6022287 to your computer and use it in GitHub Desktop.
Save iani/6022287 to your computer and use it in GitHub Desktop.
Short intro to new QT Layout scheme in SuperCollider
(
w = Window().front;
w.view.layout = HLayout(
*({ Slider() } ! 10)
)
)
(
w = Window().front;
w.view.layout = VLayout(
*({ | i |
HLayout(
StaticText().string_(format("test%", i)),
Slider().orientation_(\horizontal),
NumberBox()
)
} ! 10)
)
)
(
var label;
w = Window().front;
w.view.layout = VLayout(
*({ | i |
label = ["asdf asdf", "smalll", "s"].choose;
HLayout(
StaticText().string_(format("%-%", label, i)),
Slider().orientation_(\horizontal),
NumberBox()
)
} ! 10)
)
)
(
var label;
w = Window().front;
w.view.layout = GridLayout.rows(
*({ | i |
label = ["asdf asdf", "smalll", "s"].choose;
[
StaticText().string_(format("%-%", label, i)),
Slider().orientation_(\horizontal),
NumberBox()
]
} ! 10)
)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment