Creating a SideShow Dialog Page


As we have seen, a Menu page displays a set of button items, arranged down the display. The direction keys on the SideShow device are used to move up and down the available buttons. A Dialog page also contains buttons that the user can select by means of the direction keys. However, the buttons are arranged differently on the screen in that they are placed in a row along the bottom. A Dialog page can be themed with an image. You can see the difference between them by comparing Figures 8-13 and 8-15.

 memoGadget.AddContent(    Scf.Dialog(       1,                                   // page ID       "Location Select",                   // title       200,                                 // id of image content       Scf.Txt(ScfAlign.Center,true,Color.White,"Main Entrance"),       Scf.Btn(DeviceButton.Back,"back",100),       Scf.Btn(DeviceButton.Left,"<<", 101),       Scf.Btn(DeviceButton.Enter,"Select",102),       Scf.Btn(DeviceButton.Right,">>", 103)    ) ); 

image from book
Figure 8-15: A Dialog page.

The preceding code creates a dialog item with a picture, some text, and three buttons.

Figure 8-15 shows the Dialog page that the code would create. The user can move between the buttons and identify the required option by pressing the Select button. Note that the code also contains a button assignment for the Back button.

 Scf.Btn(DeviceButton.Back,"back",100), 

A Back button is not drawn on the Dialog page, but if the user presses the Back key on the SideShow device, the display will change to the page with the ID 100.




Embedded Programming with the Microsoft .Net Micro Framework
Embedded Programming with the Microsoft .NET Micro Framework
ISBN: 0735623651
EAN: 2147483647
Year: 2007
Pages: 118

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net