我正在尝试用groovyfx实现多页应用程序,并且我被场景改变所困。假设我有以下代码:
start {
stage(id: 'stageId', title: 'sometitle'){
scene(id:'scene1'){
button(text:'goto scene 2', onAction: {/* i guess i should do something here` */})
}
scene(id:'scene2'){
label(text:'this is scene 2')
}
}
}我该怎么做按钮的行动才能到第二场?
发布于 2013-11-05 11:41:41
你应该能够:
stageId.scene = scene2在幕后,这将获得id stageId (主stage)的元素,然后调用setScene( scene2 ) (其中scene2是第二个场景的id )。
希望这能解释:)
https://stackoverflow.com/questions/19787484
复制相似问题