application/main.c

branch
newapi
changeset 333
634e3ce80afe
parent 332
7e7c05af8f3a
child 335
91d4f0391282
--- a/application/main.c	Wed Oct 09 21:43:11 2024 +0200
+++ b/application/main.c	Sun Oct 13 11:05:38 2024 +0200
@@ -47,6 +47,7 @@
 MyDocument *doc1;
 MyDocument *doc2;
 
+UIWIDGET tabview;
 
 void action_menu(UiEvent *event, void *userdata) {
     
@@ -191,6 +192,18 @@
         ui_tab(obj, "Tab 2") {
             ui_button(obj, .label = "Button", .onclick=action_tab2_button);
         }
+        ui_tab(obj, "Tab 3         x") {
+            UiTabViewArgs args = {0};
+            tabview = ui_tabview_create(obj, args);
+            
+            UiObject *tab1 = ui_tabview_add(tabview, "Sub 1", -1);
+            ui_button(tab1, .label = "Button 1");
+            
+            
+            UiObject *tab2 = ui_tabview_add(tabview, "Sub 2", -1);
+            ui_button(tab2, .label = "Button 2");
+            
+        }
     }
     
     /*

mercurial