private void createTable() { int rows = listConnected.Count; Gtk.Label label_device_title = new Gtk.Label("<b>" + Catalog.GetString("Device") + "</b>"); Gtk.Label label_type_title = new Gtk.Label("<b>" + Catalog.GetString("Type") + "</b>"); label_device_title.UseMarkup = true; label_type_title.UseMarkup = true; label_device_title.Show(); label_type_title.Show(); table_main = new Gtk.Table((uint)rows + 1, 2, false); //not homogeneous table_main.ColumnSpacing = 20; table_main.RowSpacing = 6; table_main.Attach(label_device_title, (uint)1, (uint)2, 0, 1); table_main.Attach(label_type_title, (uint)2, (uint)3, 0, 1); list_buttons_left = new List <Gtk.Button>(); list_images = new List <Gtk.Image>(); list_labels_type = new List <Gtk.Label>(); list_buttons_right = new List <Gtk.Button>(); for (int count = 1; count <= rows; count++) { string deviceStr = listConnected[count - 1].SerialNumber + "\n\n" + listConnected[count - 1].Port; Gtk.Label label_device = new Gtk.Label(deviceStr); table_main.Attach(label_device, (uint)1, (uint)2, (uint)count, (uint)count + 1); label_device.Show(); Gtk.HBox hbox_type = new Gtk.HBox(false, 6); Button button_left = UtilGtk.CreateArrowButton(ArrowType.Left, ShadowType.In, 50, -1); button_left.Sensitive = (listConnected[count - 1].Type != TypePixList.l[0].Type); button_left.CanFocus = false; button_left.IsFocus = false; button_left.Clicked += on_button_left_clicked; //hbox_type.Add(button_left); hbox_type.PackStart(button_left, true, false, 1); //create image Pixbuf pixbuf = TypePixList.GetPix(listConnected[count - 1].Type); Gtk.Image image = new Gtk.Image(); image.Pixbuf = pixbuf; hbox_type.Add(image); hbox_type.PackStart(image, false, false, 1); Button button_right = UtilGtk.CreateArrowButton(ArrowType.Right, ShadowType.In, 50, -1); button_right.CanFocus = false; button_right.IsFocus = false; button_right.Clicked += on_button_right_clicked; button_right.Sensitive = (listConnected[count - 1].Type != TypePixList.l[TypePixList.l.Count - 1].Type); hbox_type.PackStart(button_right, true, false, 1); Gtk.VBox vbox = new Gtk.VBox(false, 2); vbox.Add(hbox_type); Gtk.Label label_type = new Gtk.Label(ChronopicRegisterPort.TypePrint(listConnected[count - 1].Type)); vbox.Add(label_type); table_main.Attach(vbox, (uint)2, (uint)3, (uint)count, (uint)count + 1); list_buttons_left.Add(button_left); list_images.Add(image); list_labels_type.Add(label_type); list_buttons_right.Add(button_right); } table_main.Show(); }