Page 8: Extra Practice - Printable Version +- Curl Global Community (https://communities.curl.com) +-- Forum: Tutorials (https://communities.curl.com/forumdisplay.php?fid=3) +--- Forum: Public Training (https://communities.curl.com/forumdisplay.php?fid=4) +---- Forum: Curl IDE Made Easy (https://communities.curl.com/forumdisplay.php?fid=6) +----- Forum: Try 2: Making a Simple Action Game (https://communities.curl.com/forumdisplay.php?fid=10) +----- Thread: Page 8: Extra Practice (/showthread.php?tid=54) |
Page 8: Extra Practice - ashimo - 06-16-2011 Extra Practice Practice Problem 1: Basics Let’s create a program that uses a CommandButton to change the color of a Frame. Hint: Give a name to the Frame, and then set the background option in the event handler. Solution Solution Program: c:\Curl\Try1\04_exercise1\start.curl Code: {value Practice Problem 2: Application Let’s add a reset button (reset-btn) to the above solution. Set the initial state of start-btn to invalid, and then add the following processing depending on which of the following three buttons are pressed. start-btn
stop-btn
reset-btn
Hint: Use the enabled? option to switch buttons between enabled and disabled. Solution Solution Program: c:\Curl\Try1\05_exercise2\start.curl Code: {value |