aboutsummaryrefslogtreecommitdiffstats
path: root/demos/modules/gwin/list/main.c
diff options
context:
space:
mode:
authorinmarket <andrewh@inmarket.com.au>2013-08-01 14:50:40 +1000
committerinmarket <andrewh@inmarket.com.au>2013-08-01 14:50:40 +1000
commit06d339456e64f6257bd72eb9343d7c899ea0b20b (patch)
tree0ada360b2157b08f6eba50f6fe38669c9f163d81 /demos/modules/gwin/list/main.c
parent44f3256be382a49361b14ec8f56aa43856e1d3bb (diff)
downloaduGFX-06d339456e64f6257bd72eb9343d7c899ea0b20b.tar.gz
uGFX-06d339456e64f6257bd72eb9343d7c899ea0b20b.tar.bz2
uGFX-06d339456e64f6257bd72eb9343d7c899ea0b20b.zip
Update gwin widgets and lists demos
Diffstat (limited to 'demos/modules/gwin/list/main.c')
-rw-r--r--demos/modules/gwin/list/main.c31
1 files changed, 20 insertions, 11 deletions
diff --git a/demos/modules/gwin/list/main.c b/demos/modules/gwin/list/main.c
index 35847be0..a3a17250 100644
--- a/demos/modules/gwin/list/main.c
+++ b/demos/modules/gwin/list/main.c
@@ -10,11 +10,11 @@ static void createWidgets(void) {
wi.customDraw = 0;
wi.customParam = 0;
wi.customStyle = 0;
- wi.g.show = TRUE;
+ wi.g.show = FALSE;
// Apply the list parameters
- wi.g.width = 300;
- wi.g.height = 200;
+ wi.g.width = 100;
+ wi.g.height = 80;
wi.g.y = 10;
wi.g.x = 10;
wi.text = "List Name";
@@ -32,7 +32,7 @@ int main(void) {
// Set the widget defaults
gwinSetDefaultFont(gdispOpenFont("UI2"));
gwinSetDefaultStyle(&WhiteWidgetStyle, FALSE);
- gdispClear(White);
+ gdispClear(Red);
// Attach the mouse input
gwinAttachMouse(0);
@@ -45,13 +45,22 @@ int main(void) {
gwinAttachListener(&gl);
// Add some items to the list widget
- gwinListAddItem(ghList1, "Item 0", TRUE);
- gwinListAddItem(ghList1, "Item 1", TRUE);
- gwinListAddItem(ghList1, "Item 2", TRUE);
- gwinListAddItem(ghList1, "Item 3", TRUE);
- gwinListAddItem(ghList1, "Item 4", TRUE);
-
- gwinRedraw(ghList1);
+ gwinListAddItem(ghList1, "Item 0", FALSE);
+ gwinListAddItem(ghList1, "Item 1", FALSE);
+ gwinListAddItem(ghList1, "Item 2", FALSE);
+ gwinListAddItem(ghList1, "Item 3", FALSE);
+ gwinListAddItem(ghList1, "Item 4", FALSE);
+ gwinListAddItem(ghList1, "Item 5", FALSE);
+ gwinListAddItem(ghList1, "Item 6", FALSE);
+ gwinListAddItem(ghList1, "Item 7", FALSE);
+ gwinListAddItem(ghList1, "Item 8", FALSE);
+ gwinListAddItem(ghList1, "Item 9", FALSE);
+ gwinListAddItem(ghList1, "Item 10", FALSE);
+ gwinListAddItem(ghList1, "Item 11", FALSE);
+ gwinListAddItem(ghList1, "Item 12", FALSE);
+ gwinListAddItem(ghList1, "Item 13", FALSE);
+
+ gwinSetVisible(ghList1, TRUE);
while(1) {
// Get an Event