Advertisement
Guest User

Untitled

a guest
Feb 25th, 2010
428
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.51 KB | None | 0 0
  1. require 'fox16'
  2. include Fox
  3.  
  4. app=FXApp.new
  5. win=FXMainWindow.new(app, 'Test')
  6.  
  7. $cb2disabled=false
  8.  
  9. cb1=FXCheckButton.new(win, 'Main button')
  10. cb1.connect(SEL_COMMAND) do |sender, selector, data|
  11.     $cb2disabled=sender.checked?
  12. end
  13.  
  14. cb2=FXCheckButton.new(win, 'Second button')
  15. cb2.connect(SEL_UPDATE) do |sender, selector, data|
  16.     message = $cb2disabled ? FXWindow::ID_DISABLE : FXWindow::ID_ENABLE
  17.     sender.handle(sender, MKUINT(message, SEL_COMMAND), nil)
  18. end
  19.  
  20. app.create
  21. win.show PLACEMENT_SCREEN
  22. app.run
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement