Method: Makeconf::GUI#update_buttons
- Defined in:
- lib/makeconf/gui.rb
#update_buttons ⇒ Object
Update the Back and Next buttons based on the position in the pagelist
90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 |
# File 'lib/makeconf/gui.rb', line 90 def if @pageIndex == 0 @backButton.configure('state', 'disabled') @nextButton.configure('state', 'normal') @nextButton.configure('text', 'Next') elsif @pageIndex == @page.length - 1 @nextButton.configure('text', 'Finish') @nextButton.configure('command', proc { exit 0 }) @backButton.configure('state', 'disabled') @cancelButton.configure('state', 'disabled') else @nextButton.configure('text', 'Next') @nextButton.configure('state', @nextButtonEnable ? 'normal' : 'disabled') @backButton.configure('state', @backButtonEnable ? 'normal' : 'disabled') end end |