-
I'm creating a Table with expanded cells. I wrote it without ktx: Table().apply {
setFillParent(true)
add(TextButton("Tutorial", skinny).apply {
onClick { doSomething() }
}).expand()
row()
add(TextButton("Play", skinny).apply {
onClick { doSomething()
}).expand()
} Trying to use ktx for it, I could not access the cells that were created, to call Any ideas? By the way, thanks for a great library! |
Beta Was this translation helpful? Give feedback.
Answered by
czyzby
Jun 26, 2017
Replies: 2 comments
-
Check the Scene2D examples section. You can access the table cells in two ways: // 1. Widget's building block lambda parameter:
scene2d.table {
button {
it.expand()
}
button { cell ->
cell.expand()
}
}
// 2. `cell` extension method:
scene2d.table {
button().cell(expand = true)
button {
// ...
}.cell(expand = true)
} |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
czyzby
-
I missed it in the docs. Thanks! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Check the Scene2D examples section. You can access the table cells in two ways: