public  MainTabPanel(MyUserControl control) {

            this.control = control;
            this.AutoSize = true;
            this.Dock = System.Windows.Forms.DockStyle.Top;
            this.Location = new System.Drawing.Point(0, 0);
            this.Name = "searchBoxPanel";
            this.TabIndex = 1;
            this.BackColor = System.Drawing.Color.LightGray;

            Image searchImage = Resource.searchImage;
            PictureBox searchpb = new PictureBox();
            searchpb.Image = searchImage;
            searchpb.Location = new System.Drawing.Point(152, 9);
            searchpb.Size = new System.Drawing.Size(40, 40);

            CustomSearchTextBox searchBox = new CustomSearchTextBox();
            searchBox.GotFocus += searchTextBoxHandler;
            searchBox.LostFocus += searchTextBoxHandler;

            CustomMainButton folderButton = new CustomMainButton();
            folderButton.Text = "Folders";
            folderButton.ForeColor = System.Drawing.Color.WhiteSmoke;
            folderButton.Location = new System.Drawing.Point(190, 8);
            folderButton.Click += folderButtonHandler;
            folderButton.BackColor = System.Drawing.Color.FromArgb(120, 120, 120);

            CustomMainButton tagButton = new CustomMainButton();
            tagButton.Text = "Tags";
            tagButton.Location = new System.Drawing.Point(270, 8);

            CustomMainButton searchButton = new CustomMainButton();
            searchButton.Text = "Search";
            searchButton.Location = new System.Drawing.Point(350, 8);

            this.Controls.Add(searchBox);
            this.Controls.Add(searchpb);
            this.Controls.Add(folderButton);
            this.Controls.Add(tagButton);
            this.Controls.Add(searchButton);
        }
 public Screen(string Name, MyUserControl Control, bool Persistent = false)
 {
     this.Name = Name;
     this.Control = Control;
     this.Type = Control.GetType();
     this.Persistent = Persistent;
 }
Exemple #3
0
		[Test]  // bug #81199
		public void NestedControls ()
		{
			Form f = new Form ();
			f.ShowInTaskbar = false;
			
			MyUserControl c = new MyUserControl ();
			c.Dock = DockStyle.Fill;
			c.Size = new Size (500, 500);
			
			f.SuspendLayout ();
			f.Controls.Add (c);
			f.ClientSize = new Size (500, 500);
			f.ResumeLayout (false);
			
			f.Show ();
			
			Assert.AreEqual (new Size (600, 600), c.lv.Size, "I1");
			f.Close ();
		}