ui/gtk/list.c

branch
newapi
changeset 356
eae98e4f3f1f
parent 350
70305d427f25
child 360
681b930abe84
--- a/ui/gtk/list.c	Sun Oct 27 09:38:21 2024 +0100
+++ b/ui/gtk/list.c	Sun Oct 27 10:22:19 2024 +0100
@@ -162,6 +162,8 @@
     
     // create treeview
     GtkWidget *view = gtk_tree_view_new();
+    ui_set_name_and_style(view, args.name, args.style_class);
+    ui_set_widget_groups(obj->ctx, view, args.groups);
     GtkCellRenderer *renderer = gtk_cell_renderer_text_new();
     GtkTreeViewColumn *column = gtk_tree_view_column_new_with_attributes(NULL, renderer, "text", 0, NULL);
     gtk_tree_view_append_column(GTK_TREE_VIEW(view), column);
@@ -589,6 +591,8 @@
     UiVar* var = uic_widget_var(obj->ctx, current->ctx, args.list, args.varname, UI_VAR_LIST);
     
     GtkWidget *combobox = ui_create_combobox(obj, model, var, args.onactivate, args.onactivatedata);
+    ui_set_name_and_style(combobox, args.name, args.style_class);
+    ui_set_widget_groups(obj->ctx, combobox, args.groups);
     UI_APPLY_LAYOUT1(current, args);
     current->container->add(current->container, combobox, FALSE);
     current->container->current = combobox;
@@ -597,7 +601,7 @@
 
 GtkWidget* ui_create_combobox(UiObject *obj, UiModel *model, UiVar *var, ui_callback f, void *udata) {
     GtkWidget *combobox = gtk_combo_box_new();
-     
+       
     UiListView *uicbox = malloc(sizeof(UiListView));
     uicbox->obj = obj;
     uicbox->widget = combobox;

mercurial