Пример #1
0
        private void BuildTile()
        {
            BorderWidth   = 5;
            RowSpacing    = 1;
            ColumnSpacing = 5;

            tileImage = new Image();

            tileImage.Yalign = 0.0f;
            Attach(tileImage, 0, 1, 0, 3, AttachOptions.Shrink, AttachOptions.Fill | AttachOptions.Expand, 0, 0);

            title = new Label();
            title.Show();
            title.Xalign = 0.0f;

            Attach(title, 1, 3, 0, 1,
                   AttachOptions.Expand | AttachOptions.Fill,
                   AttachOptions.Expand | AttachOptions.Fill, 0, 0);

            description = new WrapLabel();
            description.Show();
            description.Wrap = false;

            Attach(description, 1, 3, 1, 2,
                   AttachOptions.Expand | AttachOptions.Fill,
                   AttachOptions.Expand | AttachOptions.Fill, 0, 0);


            subDesc = new WrapLabel();
            subDesc.Show();

            Attach(subDesc, 1, 2, 2, 3,
                   AttachOptions.Expand | AttachOptions.Fill,
                   AttachOptions.Expand | AttachOptions.Fill, 0, 4);

            SetText();

            button_box         = new HBox();
            button_box.Spacing = 3;

            add_remove_button          = new Button();
            add_remove_button.Clicked += OnAddRemoveClicked;

            UpdateButtons();

            Attach(button_box, 2, 3, 2, 3,
                   AttachOptions.Shrink,
                   AttachOptions.Expand | AttachOptions.Fill, 0, 0);

            Show();

            UpdateState();
        }
Пример #2
0
		private void BuildTile ()
		{
			BorderWidth = 5;
			RowSpacing = 1;
			ColumnSpacing = 5;
			
			tileImage = new Image ();
			
			tileImage.Yalign = 0.0f;
			Attach (tileImage, 0, 1, 0, 3, AttachOptions.Shrink, AttachOptions.Fill | AttachOptions.Expand, 0, 0);
			
            title = new Label ();
            title.Show ();
            title.Xalign = 0.0f;
						
			Attach (title, 1, 3, 0, 1, 
			        AttachOptions.Expand | AttachOptions.Fill, 
			        AttachOptions.Expand | AttachOptions.Fill, 0, 0);
			
			description = new WrapLabel ();
			description.Show ();
			description.Wrap = false;
			
			Attach (description, 1, 3, 1, 2,
			        AttachOptions.Expand | AttachOptions.Fill, 
			        AttachOptions.Expand | AttachOptions.Fill, 0, 0);
			
			
			subDesc = new WrapLabel ();
			subDesc.Show ();

			Attach (subDesc, 1, 2, 2, 3,
			        AttachOptions.Expand | AttachOptions.Fill, 
			        AttachOptions.Expand | AttachOptions.Fill,  0, 4);
			
			SetText ();

			button_box = new HBox ();
			button_box.Spacing = 3;
						
			add_remove_button = new Button ();
			add_remove_button.Clicked += OnAddRemoveClicked;

			UpdateButtons ();
			
			Attach (button_box, 2, 3, 2, 3, 
			        AttachOptions.Shrink, 
				        AttachOptions.Expand | AttachOptions.Fill, 0, 0);

			Show ();
			
			UpdateState ();
		}