Пример #1
0
        public void Pack(Widget aWidget)
        {
            if (aWidget == null)
            {
                return;
            }

            if ((Count > 0) && (SeparatorLines == true))
            {
                //System.Console.WriteLine("Separator");
                VSeparator vs = new VSeparator();
                vs.Show();
                widgets[Count - 1].PackEnd(vs, false, false, 0);
            }

            widgets.Add(new HBox());
            widgets[Count - 1].Spacing = 3;
            widgets[Count - 1].Show();
            if (Homogeneous == true)
            {
                mainbox.PackStart(widgets[Count - 1], true, true, 0);
            }
            else
            {
                mainbox.PackStart(widgets[Count - 1], false, false, 0);
            }
            if (aWidget is HComboCell)
            {
                (aWidget as HComboCell).BorderWidth = 1;
                aWidget.Show();
                widgets[Count - 1].PackStart(aWidget, true, true, 0);
            }
            else
            {
                HComboCell eb = new HComboCellWidget(aWidget);
                eb.BorderWidth = 1;
                aWidget.Show();
                eb.Show();
                widgets[Count - 1].PackStart(eb, true, true, 0);
            }
            if (Count == 1)
            {
                Selected = 0;
            }
        }
		public void Pack (Widget aWidget)
		{
			if (aWidget == null)
				return;
			
			if ((Count > 0) && (SeparatorLines == true)) {
				//System.Console.WriteLine("Separator");
				VSeparator vs = new VSeparator();
				vs.Show();
				widgets[Count-1].PackEnd (vs, false, false, 0);
			}

			widgets.Add (new HBox());
			widgets[Count-1].Spacing = 3;
			widgets[Count-1].Show();
			if (Homogeneous == true)
				mainbox.PackStart (widgets[Count-1], true, true, 0);
			else
				mainbox.PackStart (widgets[Count-1], false, false, 0);
			if (aWidget is HComboCell) {
				(aWidget as HComboCell).BorderWidth = 1;
				aWidget.Show();
				widgets[Count-1].PackStart (aWidget, true, true, 0);
			}
			else {
				HComboCell eb = new HComboCellWidget (aWidget);
				eb.BorderWidth = 1;
				aWidget.Show();
				eb.Show();
				widgets[Count-1].PackStart (eb, true, true, 0);
			}
			if (Count == 1)
				Selected = 0;
		}