public static void ReorderWidgets(Box box) { var items = new ChildPacking[box.Children.Length]; for (int i = 0; i < items.Length; i++) { bool expand, fill; uint padding; PackType packType; box.QueryChildPacking(box.Children[i], out expand, out fill, out padding, out packType); items[i] = new ChildPacking { Expand = expand, Fill = fill, Padding = padding, PackType = packType, Widget = box.Children[i] }; } foreach (var item in items) { box.Remove(item.Widget); } foreach (var item in items) { box.PackEnd(item.Widget); box.SetChildPacking(item.Widget, item.Expand, item.Fill, item.Padding, item.PackType); } }
void reset_hbox_list_d(int colsNum) { foreach (Gtk.SpinButton sp in hbox_list_d.Children) { hbox_list_d.Remove(sp); } for (int i = 0; i < colsNum; i++) { switch (i) { case 0: hbox_list_d.PackStart(spin_d_0, false, false, 0); break; case 1: hbox_list_d.PackStart(spin_d_1, false, false, 0); break; case 2: hbox_list_d.PackStart(spin_d_2, false, false, 0); break; case 3: hbox_list_d.PackStart(spin_d_3, false, false, 0); break; case 4: hbox_list_d.PackStart(spin_d_4, false, false, 0); break; case 5: hbox_list_d.PackStart(spin_d_5, false, false, 0); break; case 6: hbox_list_d.PackStart(spin_d_6, false, false, 0); break; case 7: hbox_list_d.PackStart(spin_d_7, false, false, 0); break; case 8: hbox_list_d.PackStart(spin_d_8, false, false, 0); break; case 9: hbox_list_d.PackStart(spin_d_9, false, false, 0); break; } } hbox_list_d.ShowAll(); }
public void CreateComboCheckBoxes() { if (hbox_combo_all_none_selected.Children.Length > 0) { hbox_combo_all_none_selected.Remove(combo_all_none_selected); } combo_all_none_selected = ComboBox.NewText(); UtilGtk.ComboUpdate(combo_all_none_selected, comboCheckBoxesOptions, ""); //combo_all_none_selected.DisableActivate (); combo_all_none_selected.Changed += new EventHandler(on_combo_all_none_selected_changed); hbox_combo_all_none_selected.PackStart(combo_all_none_selected, true, true, 0); hbox_combo_all_none_selected.ShowAll(); combo_all_none_selected.Sensitive = true; combo_all_none_selected.Active = UtilGtk.ComboMakeActive(comboCheckBoxesOptions, Catalog.GetString("Selected")); }