Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6847005
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T00:41:31+00:00 2026-05-27T00:41:31+00:00

I created a user control for Windows forms application. All it has is a

  • 0

I created a user control for Windows forms application. All it has is a TableLayoutPanel with four cells. Cell[0,0] and cell[0,1] have labels. Cell[1,0] has a treeview and cell[1,1] has CheckedListBox.

For all four controls, I have set docking to Fill. That freaking CheckedListBox appears smaller than TreeView. Is there any way to get proper docking for the controls?

BTW, I am using .Net 3.5 and VS 2010.

Following is the designer file code for the control:

namespace UserControls
{
    partial class LinkedContent
    {
        /// <summary> 
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;

        /// <summary> 
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

        #region Component Designer generated code

        /// <summary> 
        /// Required method for Designer support - do not modify 
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
            this.lblContentGroups = new System.Windows.Forms.Label();
            this.lblModules = new System.Windows.Forms.Label();
            this.tvContent = new System.Windows.Forms.TreeView();
            this.chkListBoxModules = new System.Windows.Forms.CheckedListBox();
            this.tableLayoutPanel1.SuspendLayout();
            this.SuspendLayout();
            // 
            // tableLayoutPanel1
            // 
            this.tableLayoutPanel1.CellBorderStyle = System.Windows.Forms.TableLayoutPanelCellBorderStyle.Single;
            this.tableLayoutPanel1.ColumnCount = 2;
            this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
            this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
            this.tableLayoutPanel1.Controls.Add(this.lblContentGroups, 0, 0);
            this.tableLayoutPanel1.Controls.Add(this.lblModules, 1, 0);
            this.tableLayoutPanel1.Controls.Add(this.tvContent, 0, 1);
            this.tableLayoutPanel1.Controls.Add(this.chkListBoxModules, 1, 1);
            this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
            this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
            this.tableLayoutPanel1.Name = "tableLayoutPanel1";
            this.tableLayoutPanel1.RowCount = 2;
            this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 7.760532F));
            this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 92.23947F));
            this.tableLayoutPanel1.Size = new System.Drawing.Size(501, 451);
            this.tableLayoutPanel1.TabIndex = 0;
            // 
            // lblContentGroups
            // 
            this.lblContentGroups.AutoSize = true;
            this.lblContentGroups.Dock = System.Windows.Forms.DockStyle.Fill;
            this.lblContentGroups.Location = new System.Drawing.Point(4, 1);
            this.lblContentGroups.Name = "lblContentGroups";
            this.lblContentGroups.Size = new System.Drawing.Size(243, 34);
            this.lblContentGroups.TabIndex = 0;
            this.lblContentGroups.Text = "Content Groups";
            this.lblContentGroups.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
            // 
            // lblModules
            // 
            this.lblModules.AutoSize = true;
            this.lblModules.Dock = System.Windows.Forms.DockStyle.Fill;
            this.lblModules.Location = new System.Drawing.Point(254, 1);
            this.lblModules.Name = "lblModules";
            this.lblModules.Size = new System.Drawing.Size(243, 34);
            this.lblModules.TabIndex = 1;
            this.lblModules.Text = "Modules";
            this.lblModules.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
            // 
            // tvContent
            // 
            this.tvContent.CheckBoxes = true;
            this.tvContent.Dock = System.Windows.Forms.DockStyle.Fill;
            this.tvContent.Location = new System.Drawing.Point(4, 39);
            this.tvContent.Name = "tvContent";
            this.tvContent.Size = new System.Drawing.Size(243, 408);
            this.tvContent.TabIndex = 2;
            // 
            // chkListBoxModules
            // 
            this.chkListBoxModules.Dock = System.Windows.Forms.DockStyle.Fill;
            this.chkListBoxModules.FormattingEnabled = true;
            this.chkListBoxModules.Location = new System.Drawing.Point(254, 39);
            this.chkListBoxModules.Name = "chkListBoxModules";
            this.chkListBoxModules.Size = new System.Drawing.Size(243, 408);
            this.chkListBoxModules.TabIndex = 3;
            // 
            // LinkedContent
            // 
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.Controls.Add(this.tableLayoutPanel1);
            this.Name = "LinkedContent";
            this.Size = new System.Drawing.Size(501, 451);
            this.tableLayoutPanel1.ResumeLayout(false);
            this.tableLayoutPanel1.PerformLayout();
            this.ResumeLayout(false);

        }

        #endregion

        private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
        private System.Windows.Forms.Label lblContentGroups;
        private System.Windows.Forms.Label lblModules;
        private System.Windows.Forms.TreeView tvContent;
        private System.Windows.Forms.CheckedListBox chkListBoxModules;
    }
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T00:41:32+00:00Added an answer on May 27, 2026 at 12:41 am

    Check to make sure the IntegralHeight Property is not set. It defaults to true.

    From above MSDN Link:

    When this property is set to true, the control automatically resizes
    to ensure that an item is not partially displayed. If you want to
    maintain the original size of the ListBox based on the space
    requirements of your form, set this property to false.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've created a user control in a Windows Application C# 3.5 and it has
I have created a textbox in a Windows Forms application that starts out at
In Windows Forms, I have created a Twitter application that gets the latest tweets
I have created a user control to handle adding comments to certain business entities,
I have created a user control (CheckedDirTree) that exposes a CheckedFolder property which in
i'm trying to learn about user controls. I created a user control that has
Background: I have created sample windows application for learning to implement localization. My each
I have (what should be) a very simple Windows Forms application. There is a
My windows forms application hosts AvalonEdit (the composite WPF control in question) in one
I have created a dialog box in my WinForms application. This has many text

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.