aboutsummaryrefslogtreecommitdiffstats
path: root/demos/modules/gwin/list
diff options
context:
space:
mode:
authorJoel Bodenmann <joel@unormal.org>2014-04-26 03:27:19 +0200
committerJoel Bodenmann <joel@unormal.org>2014-04-26 03:27:19 +0200
commit8b4ca720369d790ea330bc2189efa05cc557c2f7 (patch)
tree5793ec1e16ef8562657d495ea777c92c67573290 /demos/modules/gwin/list
parentaf3dae4f42d6308883ccdd39644fd9fb484dfa26 (diff)
downloaduGFX-8b4ca720369d790ea330bc2189efa05cc557c2f7.tar.gz
uGFX-8b4ca720369d790ea330bc2189efa05cc557c2f7.tar.bz2
uGFX-8b4ca720369d790ea330bc2189efa05cc557c2f7.zip
Added gwinListEnableRender()
Diffstat (limited to 'demos/modules/gwin/list')
-rw-r--r--demos/modules/gwin/list/main.c12
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