Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require 'fox16'
- include Fox
- app=FXApp.new
- win=FXMainWindow.new(app, 'Test')
- $cb2disabled=false
- cb1=FXCheckButton.new(win, 'Main button')
- cb1.connect(SEL_COMMAND) do |sender, selector, data|
- $cb2disabled=sender.checked?
- end
- cb2=FXCheckButton.new(win, 'Second button')
- cb2.connect(SEL_UPDATE) do |sender, selector, data|
- message = $cb2disabled ? FXWindow::ID_DISABLE : FXWindow::ID_ENABLE
- sender.handle(sender, MKUINT(message, SEL_COMMAND), nil)
- end
- app.create
- win.show PLACEMENT_SCREEN
- app.run
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement