Answered step by step
Verified Expert Solution
Question
1 Approved Answer
The Ok button and Cancel button will each need an event added to the event table. The event methods will be of type EVT _
The Ok button and Cancel button will each need an event added to the event table. The event methods will be of type EVTBUTTON. As for the Id for each button, there is a special Id that is used for the Ok and Cancel buttons.
The button click handlers will each take in a wxCommandEvent& as its parameter. Add an event method to the header file for the Ok and Cancel buttons.
If the user clicks on the Ok button, the values from the color pickers and spinners need to be written to the settings object for saving.
If the user clicks on the Cancel button, no changes should be made to the settings object.
Click on either the Ok button or the Cancel button needs to close the window. This is done with the EndModal command. EndModal takes in an Id when it's called. This Id should be the Id of the button that was clicked wxIDOK or wxIDCANCEL This will allow the main window method that opened the settings dialog to check to see which option was selected.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started