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 6: Integrating Applications (https://communities.curl.com/forumdisplay.php?fid=14) +----- Thread: Page 8: Extra Practice (/showthread.php?tid=86) |
Page 8: Extra Practice - ashimo - 06-20-2011 Extra Practice Practice Problem 1: Basics Let’s take the example from Basics 1 and create a TabContainer with a label displayed on the right. Furthermore, in the initial display, have the "Page 2" tab displayed. Hint: We can specify the position of a label using the tab-placement of a TabContainer. In TabPane, for the item that is to be displayed initially, the value of show? should be true. Solution Solution Program: c:\Curl\Try6\04_exercise1\start.curl Code: {value Explanation Using the tab-placement option, we can place the label on any side of the tab container (top, bottom, left, right). And, by setting show?=true, we can specify which pane is initially displayed. Practice Problem 2: Application In the “Application” section, we used tabs to switch panes. Here we’ll modify the layout, create a navigation section, and provide a means of switching the content by pressing a command button. Hint: To replace dynamic content, use a Frame. Frame.add has a keyword parameter replace?. If replace? is true, then the Frame's previous child, if any, will be replaced with a the specified graphical object. Solution Solution Program: c:\Curl\Try6\05_exercise2\start.curl
Code: {include make-chart.scurl} Explanation Frame is used to replace dynamic content. We use the replace?=true option on the add method. This method is often used to implement page transitions in Curl applications. |