Advertisement
Guest User

Untitled

a guest
Nov 30th, 2015
376
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. def ListBoxEx(self, parent, x, y, width, heigh):
  2. bar = ui.Bar()
  3. if parent != None:
  4. bar.SetParent(parent)
  5. bar.SetPosition(x, y)
  6. bar.SetSize(width, heigh)
  7. bar.SetColor(0x77000000)
  8. bar.Show()
  9. ListBox=ui.ListBoxEx()
  10. ListBox.SetParent(bar)
  11. ListBox.SetPosition(0, 0)
  12. ListBox.SetSize(width, heigh)
  13. ListBox.SetViewItemCount(10)
  14. ListBox.Show()
  15. scroll = ui.ScrollBar()
  16. scroll.SetParent(ListBox)
  17. scroll.SetPosition(width-15, 0)
  18. scroll.SetScrollBarSize(heigh)
  19. scroll.Show()
  20. ListBox.SetScrollBar(scroll)
  21. return bar, ListBox
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement