| 659 // and list updates |
659 // and list updates |
| 660 UiListView *tableview = create_listview(obj, args); |
660 UiListView *tableview = create_listview(obj, args); |
| 661 |
661 |
| 662 GtkSelectionModel *selection_model = create_selection_model(tableview, ls, args->multiselection); |
662 GtkSelectionModel *selection_model = create_selection_model(tableview, ls, args->multiselection); |
| 663 GtkWidget *view = gtk_column_view_new(GTK_SELECTION_MODEL(selection_model)); |
663 GtkWidget *view = gtk_column_view_new(GTK_SELECTION_MODEL(selection_model)); |
| |
664 if(args->hide_header) { |
| |
665 gtk_widget_set_visible(gtk_widget_get_first_child(view), FALSE); |
| |
666 } |
| 664 |
667 |
| 665 UiVar* var = uic_widget_var(obj->ctx, obj->ctx, args->list, args->varname, UI_VAR_LIST); |
668 UiVar* var = uic_widget_var(obj->ctx, obj->ctx, args->list, args->varname, UI_VAR_LIST); |
| 666 |
669 |
| 667 // init tableview |
670 // init tableview |
| 668 tableview->widget = view; |
671 tableview->widget = view; |
| 1383 } |
1386 } |
| 1384 |
1387 |
| 1385 UIWIDGET ui_table_create(UiObject *obj, UiListArgs *args) { |
1388 UIWIDGET ui_table_create(UiObject *obj, UiListArgs *args) { |
| 1386 // create treeview |
1389 // create treeview |
| 1387 GtkWidget *view = gtk_tree_view_new(); |
1390 GtkWidget *view = gtk_tree_view_new(); |
| |
1391 if(args->hide_header) { |
| |
1392 gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(view), FALSE); |
| |
1393 } |
| 1388 |
1394 |
| 1389 UiModel *model = args->model; |
1395 UiModel *model = args->model; |
| 1390 int columns = model ? model->columns : 0; |
1396 int columns = model ? model->columns : 0; |
| 1391 |
1397 |
| 1392 // find the last data column index |
1398 // find the last data column index |