mvan231

Scriptable Widget Stacks Horizontal Example

Nov 10th, 2021
1,597
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. let w = new ListWidget()
  2.  
  3. let main = w.addStack()
  4. let st1 = main.addStack()
  5. main.addSpacer()
  6. let st2 = main.addStack()
  7.  
  8. main.layoutHorizontally()
  9.  
  10. st1.addText("this is a text")
  11.  
  12. st2.addText(new Date().toLocaleDateString())
  13.  
  14. st1.borderColor=Color.red()
  15. st2.borderColor=Color.blue()
  16. st1.borderWidth=2
  17. st2.borderWidth=3
  18.  
  19. Script.setWidget(w)
  20. Script.complete()
  21. w.presentMedium()
Advertisement
Add Comment
Please, Sign In to add comment