diff options
| author | Joel Bodenmann <joel@unormal.org> | 2014-04-27 16:24:13 +0200 |
|---|---|---|
| committer | Joel Bodenmann <joel@unormal.org> | 2014-04-27 16:24:13 +0200 |
| commit | 85dd732c2b78dabfe4edf4f74c3a82fccd42275c (patch) | |
| tree | 9144492b57a281855cf721faf03e41ae6f5e9392 /demos/modules/gwin/list/main.c | |
| parent | 43a143588c8c62ab1474b896d5afd6c2bf11a8f3 (diff) | |
| parent | 8b4ca720369d790ea330bc2189efa05cc557c2f7 (diff) | |
| download | uGFX-85dd732c2b78dabfe4edf4f74c3a82fccd42275c.tar.gz uGFX-85dd732c2b78dabfe4edf4f74c3a82fccd42275c.tar.bz2 uGFX-85dd732c2b78dabfe4edf4f74c3a82fccd42275c.zip | |
Merge branch 'master' into gwin
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 |
