diff options
author | Joel Bodenmann <joel@unormal.org> | 2014-04-30 13:41:34 +0200 |
---|---|---|
committer | Joel Bodenmann <joel@unormal.org> | 2014-04-30 13:41:34 +0200 |
commit | 33c721c009465dd30d4e96e055a051480c567b57 (patch) | |
tree | 5a6744a79b7469d80bae474d4314b47d4cd6d44d /demos/modules/gwin/list/main.c | |
parent | 58cf2d2b35542166f1a4e50a83bcf28ff33574a5 (diff) | |
parent | a394e2c35dde67241bea69409bcae9f46dcfc089 (diff) | |
download | uGFX-33c721c009465dd30d4e96e055a051480c567b57.tar.gz uGFX-33c721c009465dd30d4e96e055a051480c567b57.tar.bz2 uGFX-33c721c009465dd30d4e96e055a051480c567b57.zip |
Merge branch 'master' into freertos
Diffstat (limited to 'demos/modules/gwin/list/main.c')
-rw-r--r-- | demos/modules/gwin/list/main.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/demos/modules/gwin/list/main.c b/demos/modules/gwin/list/main.c index 36820c23..3811c36f 100644 --- a/demos/modules/gwin/list/main.c +++ b/demos/modules/gwin/list/main.c @@ -52,10 +52,6 @@ static void createWidgets(void) { wi.text = "List 2: Smooth scrolling"; ghLabel1 = gwinLabelCreate(NULL, &wi); - // Make list widgets invisible by default as they would issue - // a re-render at every time an item is added - wi.g.show = FALSE; - // The first list widget wi.g.width = 150; wi.g.height = 100; @@ -112,6 +108,9 @@ int main(void) { gwinListAddItem(ghList1, "Item 13", FALSE); // Add some items to the second list widget + // This time we will disable the render until + // all the items have been added + gwinListEnableRender(ghList2, FALSE); gwinListAddItem(ghList2, "Item 0", FALSE); gwinListAddItem(ghList2, "Item 1", FALSE); gwinListAddItem(ghList2, "Item 2", FALSE); @@ -126,10 +125,7 @@ int main(void) { gwinListAddItem(ghList2, "Item 11", FALSE); gwinListAddItem(ghList2, "Item 12", FALSE); gwinListAddItem(ghList2, "Item 13", FALSE); - - // Make all the lists visible - gwinSetVisible(ghList1, TRUE); - gwinSetVisible(ghList2, TRUE); + gwinListEnableRender(ghList2, TRUE); while(1) { // Get an Event |