Advertisement
Guest User

Untitled

a guest
Jan 23rd, 2017
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. # encoding: utf-8
  2.  
  3. module Yast
  4. class ReplacePoint1Client < Client
  5. def main
  6. Yast.import "UI"
  7. UI.OpenDialog(
  8. VBox(
  9. ReplacePoint(Id("rp"), Label("This is a label with a string Id")),
  10. PushButton(Id(:change), "Change")
  11. )
  12. )
  13. UI.UserInput
  14. UI.ReplaceWidget(Id("rp"), PushButton("This is a PushButton"))
  15. UI.UserInput
  16. UI.ReplaceWidget(Id("rp"), CheckBox("This is a CheckBox"))
  17. UI.UserInput
  18. UI.ReplaceWidget(
  19. Id("rp"),
  20. HBox(PushButton("Button1"), PushButton("Button2"))
  21. )
  22. UI.UserInput
  23. UI.CloseDialog
  24.  
  25. nil
  26. end
  27. end
  28. end
  29.  
  30. Yast::ReplacePoint1Client.new.main
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement