Hosting a Windows Control

Introduction to Controls

A Windows control, or an application's control, or simply a control, is an object in a computer control. That object allows the user of an application to interact with the computer, to tell the computer what the user wants, or what the user wishes to see happening. Computers, or operating systems, support various types of controls, and the controls perform various roles. This means that there are various types of controls with different goals. We have already seen that every control has a class that holds the characteristics (properties), the actions that the control can perform (its methods), and the occurrences (events) related to it.

To make a control available and useable to your application, you can select that control from the Toolbox and add it to your project. As an alternative, you can create a control programmatically. Almost all the controls you will need are created in the System.Windows.Forms namespace that belongs to the System.Windows.Forms.dll assembly. Therefore, you must add a reference to that assembly in your project and you can/should include that namespace to your code. If you create a Windows Forms App (.NET Framework) or a Windows Forms App (.NET Core) project, the reference is automatically created and the namespace appropriately added. After performing any of those actions, you can declare a variable using the class of the control. Here are two examples:

using System;
using System.Windows.Forms;

namespace ControlsFundamentals
{
    public partial class Form1 : Form
    {
        public Form1() => InitializeComponent();

        private void btnControls_Click(object sender, EventArgs e)
        {
            RadioButton rdoMedium = new RadioButton();
            GroupBox gbxPizzaSize = new GroupBox();
        }
    }
}

Of course, you can programmatically access other properties of a control. Here are examples:

using System;
using System.Drawing;
using System.Windows.Forms;

namespace ControlsFundamentals
{
    public partial class Form1 : Form
    {
        public Form1() => InitializeComponent();

        private void btnControls_Click(object sender, EventArgs e)
        {
            RadioButton rdoMedium = new RadioButton();

            rdoMedium.Location = new Point(24, 58);
            rdoMedium.Width    = 61;
            rdoMedium.Text     = "Medium";

            GroupBox gbxPizzaSize = new GroupBox();

            gbxPizzaSize.Location = new Point(12, 12);
            gbxPizzaSize.Size     = new Size(109, 126);
            gbxPizzaSize.Text     = "Pizza Size";
        }
    }
}

When it comes to adding objects to your application, there are two broad categories of controls.

A Control's Container

When you pick up a control from the Toolbox, you must drop that control somewhere so your application can use it. A control container is a special control that can receive or host other controls. Microsoft Windows (and other operating systems) support various types of controls containers.

As mentionned already, a control container is used to hold or carry controls placed on it. When a container moves, it does so with the controls placed on it. When a control container is visible, the controls placed on it can be visible too, unless they have their own visibility removed. When a container is hidden, its child controls are hidden too, regardless of their own visibility status.

A Control's Container is a Collection

To make it possible for an object to host other objects, the class of every container is equipped with a read-only property named Controls. This property is based on a class named ControlCollection which, as its name implies, is a collection class:

[System.ComponentModel.Browsable(false)]
public System.Windows.Forms.Control.ControlCollection Controls { get; }

The ControlCollection class is equipped with all the basic operations of colleection class, including the ability to add, delete, or count the items in the list.

To support the ability to add a control to a container, the ControlCollection class is equipped with a method named Add. Its syntax is:

public virtual void Add (System.Windows.Forms.Control value);

This method takes as argument an object that derives from the Control class, which is the case for all Windows controls. Therefore, to programmatically add a control to a container, access the Control property of the container and call the Add() method on it. Pass the variable name of the control you want. Here is an example:

using System;
using System.Drawing;
using System.Windows.Forms;

namespace ControlsFundamentals
{
    public partial class Form1 : Form
    {
        public Form1() => InitializeComponent();

        private void btnControls_Click(object sender, EventArgs e)
        {
            RadioButton rdoMedium = new RadioButton();

            rdoMedium.Location = new Point(24, 58);
            rdoMedium.Width    = 61;
            rdoMedium.Text     = "Medium";

            GroupBox gbxPizzaSize = new GroupBox();

            gbxPizzaSize.Location = new Point(12, 12);
            gbxPizzaSize.Size     = new Size(109, 126);
            gbxPizzaSize.Text     = "Pizza Size";

            gbxPizzaSize.Controls.Add(rdoMedium);
        }
    }
}

A Form or Dialog Box as a Container

As seen so far, a form is the most fundamental container of an application. All the controls of an application are placed directly or indirectly on a form. Therefore, to programmatically position a control on a form, access the Controls property of the form, call the Add() method on that property, and pass the variable of the control to it. Here is an example:

using System.Drawing;
using System.Windows.Forms;

public class Exercise
{
    public static void Main()
    {
        Form frmExercise = new Form();

        RadioButton rdoMedium = new RadioButton();

        rdoMedium.Location = new Point(24, 58);
        rdoMedium.AutoSize = true;
        rdoMedium.Text = "Medium";

        GroupBox gbxPizzaSize = new GroupBox();

        gbxPizzaSize.Location = new Point(12, 12);
        gbxPizzaSize.Size = new Size(109, 126);
        gbxPizzaSize.Text = "Pizza Size";

        gbxPizzaSize.Controls.Add(rdoMedium);

        frmExercise.Controls.Add(gbxPizzaSize);
        frmExercise.ShowDialog();
    }
}

Introduction to the Panel Control

Description

The panel is a rectangular object that can provide various valuable services for application design. For example, a panel can be used as control delimiter for objects that behave as a group. An example would be a set of radio buttons.

A panel is a complete control with properties, methods, and events. For example, its background color can be changed.

Practical LearningPractical Learning: Introducing Panels

  1. Save the following graphics:
    Blocking a Thread Blocking a Thread
    Blocking a Thread Blocking a Thread
  2. Start Microsoft Visual Studio and create a Windows Forms application named ObliqueTriangles1
  3. In the Solution Explorer, right-click Form1.cs and click Rename
  4. Type ObliqueTriangles (to get ObliqueTriangles.cs) and press Enter
  5. Read the message on the message box and click Yes

Creating a Panel

To support panels, the .NET Framework provides a class named Panel. You can use it to programmatically create a panel.

Unlike a form, during design, a panel must primarily be positioned on another container which would be a form or another panel. To add a panel to your project, on the Toolbox, expand the Containers section. Click the Panel button Panel and click the form or another container.

To programmatically create a panel, declare a variable of type Panel, allocate memory for it using the new operator, and add it to its parent. Here is an example:

using System;
using System.Drawing;
using System.Windows.Forms;

public class Exercise : System.Windows.Forms.Form
{
    Panel pnlContainer;

    public Exercise()
    {
        InitializeComponent();
    }

    private void InitializeComponent()
    {
        Text     = "Domain Configuration";
        Width    = 320;
        Height   = 210;
        Location = System.Drawing.Point(140, 100);
        StartPosition = FormStartPosition.CenterScreen;

        pnlContainer = new Panel();
        pnlContainer.Location = Point(20, 20);
        pnlContainer.Size = System.Drawing.Size(100, 60);
        Controls.Add(pnlContainer);
    }
}

public class Program
{
    static int Main()
    {
        System.Windows.Forms.Application.Run(new Exercise());
        return 0;
    }
}

Practical LearningPractical Learning: Creating Panels

  1. In the Toolbox, expand Containers and click Panel
  2. Click the form
  3. Complete the design of the form as follows:

    Introducing Panels

    Control (Name) Text Other Properties
    Panel pnlCategories    
    Label   Select the Category of Known Values Font: Times New Roman, 9.75pt, style=Bold
    RadioButton rdoAAS AAS - Known Values: Two angles and a side opposite one of them  
    RadioButton rdoASA ASA - Known Values: Two angles and the side between them  
    RadioButton rdoSAS SAS - Known Values: Two sides and the angle between them  
    RadioButton rdoSSS SSS - Known Values: All three sides  
    Panel pnlAAS    
  4. In the Common Controls section of the Toolbox, click PictureBox and click inside the right panel on the form
  5. While the new picture box is still selected on the form, in the Properties window, click Image and click its ellipsis button
  6. On the Select Resource dialog box, click Import
  7. Locate and select each of the graphics you had selected (you can click one of them, press and hold Ctrl, click each of the other graphics, and release Ctrl)
  8. On the Open dialog box, click Open
  9. On the Select Resource dialog box, click aas
  10. On the Select Resource dialog box, click OK
  11. Complete the design of the right panel as follows:

    Introducing Panels

    Control (Name) Text Other Properties
    PictureBox pbxAAS   SizeMode: AutoSize
    Label   Known Values Font: Times New Roman, 12pt, style=Bold
    Label   Angle 1:  
    TextBox txtAASAngle1   TextAlign: Right
    Label   Angle 2:  
    TextBox txtAASAngle2   TextAlign: Right
    Label   Side 1  
    TextBox txtAASSide1   TextAlign: Right
    Button btnAASCalculate Calculate  
    Label   Unknown Values Font: Times New Roman, 12pt, style=Bold
    Label   Angle 3:  
    TextBox txtAASAngle3   TextAlign: Right
    Label   Side 2:  
    TextBox txtAASSide2   TextAlign: Right
    Label   Side 3  
    TextBox txtAASSide3   TextAlign: Right
    Button btnClose Close  
  12. Enlarge the form
  13. Click a border of the right panel to select it, then press Ctrl + C to copy it
  14. Click an occupied area of the form to deselect everything, then press Ctrl + V to paste
  15. Paste that panel wo more times
  16. Complete the design of the right panel as follows:

    Introducing Panels

    Control (Name) Text Other Properties
    Panel pnlASA    
    PictureBox pbxASA   Image: asa
    SizeMode: AutoSize
    Label   Known Values Font: Times New Roman, 12pt, style=Bold
    Label   Angle 1:  
    TextBox txtASAAngle1   TextAlign: Right
    Label   Angle 2:  
    TextBox txtASAAngle2   TextAlign: Right
    Label   Side 1:  
    TextBox txtASASide1   TextAlign: Right
    Button btnASACalculate Calculate  
    Label   Unknown Values Font: Times New Roman, 12pt, style=Bold
    Label   Angle 3:  
    TextBox txtASAAngle3   TextAlign: Right
    Label   Side 2:  
    TextBox txtASASide2   TextAlign: Right
    Label   Side 3:  
    TextBox txtASASide3   TextAlign: Right
    Panel pnlSAS    
    PictureBox pbxSAS   Image: sas
    SizeMode: AutoSize
    Label   Known Values Font: Times New Roman, 12pt, style=Bold
    Label   Side 1:  
    TextBox txtSASSide1   TextAlign: Right
    Label   Angle 1:  
    TextBox txtSASAngle1   TextAlign: Right
    Label   Side 2:  
    TextBox txtSASSide2   TextAlign: Right
    Button btnSASCalculate Calculate  
    Label   Unknown Values Font: Times New Roman, 12pt, style=Bold
    Label   Side 3:  
    TextBox txtSASSide3   TextAlign: Right
    Label   Angle 2:  
    TextBox txtSASAngle2   TextAlign: Right
    Label   Angle 3:  
    TextBox txtSASAngle3   TextAlign: Right
    Panel pnlSSS    
    PictureBox pbxSSS   Image: sss
    SizeMode: AutoSize
    Label   Known Values Font: Times New Roman, 12pt, style=Bold
    Label   Side 1:  
    TextBox txtSSSSide1   TextAlign: Right
    Label   Side 2:  
    TextBox txtSSSSide2   TextAlign: Right
    Label   Side 3:  
    TextBox txtSSSSide3   TextAlign: Right
    Button btnSSSCalculate Calculate  
    Label   Unknown Values Font: Times New Roman, 12pt, style=Bold
    Label   Angle 1:  
    TextBox txtSSSAngle1   TextAlign: Right
    Label   Angle 2:  
    TextBox txtSSSAngle2   TextAlign: Right
    Label   Angle 3:  
    TextBox txtSSSAngle3   TextAlign: Right
  17. On the form, double-click the AAS radio button
  18. Return to the form and double-click the ASA radio button
  19. Return to the form and double-click the SAS radio button
  20. Return to the form and double-click the SSS radio button
  21. Return to the form and double-click an unoccupied area of the form

Characteristics of a Panel Control

Introduction

As stated already, a panel is an object created from the Panel class. This class is derived from the ScrollableControl class where it gets its primary characteristics. The ScrollableControl class itself is derived from the Control class. Based on this, a property that is highly used on panels (and forms) is the Color. If you change the BackColor property, the new color would cover the face of the panel.

The Visibility of a Container

As mentioned in our introduction, controls container partly control some of the characteristics of the controls they are hosting, including the availability. For example, when a container is visiable, its controls are visible too. When a container is hidden, its controls are hidden too.

Practical LearningPractical Learning: Controlling the Visibility of a Container

  1. Change the document as follows:
    using System;
    using System.Windows.Forms;
    
    namespace ObliqueTriangles10
    {
        public partial class ObliqueTriangles : Form
        {
            public ObliqueTriangles()
            {
                InitializeComponent();
            }
    
            private void rdoAAS_CheckedChanged(object sender, EventArgs e)
            {
                pnlAAS.Visible = true;
                pnlASA.Visible = false;
                pnlSAS.Visible = false;
                pnlSSS.Visible = false;
            }
    
            private void rdoASA_CheckedChanged(object sender, EventArgs e)
            {
                pnlASA.Visible = true;
                pnlAAS.Visible = false;
                pnlSAS.Visible = false;
                pnlSSS.Visible = false;
            }
    
            private void rdoSAS_CheckedChanged(object sender, EventArgs e)
            {
                pnlSAS.Visible = true;
                pnlASA.Visible = false;
                pnlAAS.Visible = false;
                pnlSSS.Visible = false;
            }
    
            private void rdoSSS_CheckedChanged(object sender, EventArgs e)
            {
                pnlSSS.Visible = true;
                pnlSAS.Visible = false;
                pnlASA.Visible = false;
                pnlAAS.Visible = false;
            }
    
            private void ObliqueTriangles_Load(object sender, EventArgs e)
            {
                pnlSSS.Location = pnlSAS.Location = pnlASA.Location = pnlAAS.Location;
                rdoAAS.Checked = true;
                rdoAAS_CheckedChanged(sender, e);
            }
        }
    }
  2. Return to the form

The Border Style

By default, a panel is drawn without borders. If you want to add borders to it, use the BorderStyle property. It provides three values that you can set in the Properties window: None, FixedSingle, and Fixed3D and their effects are as follows:

  None FixedSingle Fixed3D
Design A panel with a None value as BorderStyle A panel with a FixedSingle value as BorderStyle A panel with a Fixed3Dvalue as BorderStyle
Run

To programmatically specify the border style, assign the desired value to the Panel.BorderStyle property. Here is an example:

private void InitializeComponent()
{
        Text     = "Domain Configuration";
        Width    = 320;
        Height   = 210;
        Location = System.Drawing.Point(140, 100);
        StartPosition = FormStartPosition.CenterScreen;

        pnlContainer = new Panel();
        pnlContainer.Location = Point(20, 20);
        pnlContainer.Size = System.Drawing.Size(100, 60);
        pnlContainer.BorderStyle = BorderStyle.Fixed3D;

        Controls.Add(pnlContainer);
}

A panel can be used as a button, in which case the user would click it to initiate an action.

Practical LearningPractical Learning: Setting the Border of a Control

  1. Click each of the panels on the form
  2. In the Properties window, set the BorderStyle to Fixed3D

    Setting the Border of a Control

  3. On the form, double-click the AAS button
  4. Return to the form and double-click the ASA button
  5. Return to the form and double-click the SAS button
  6. Return to the form and double-click the SSS button
  7. Return to the form and resize it (only resize the form, don't worry about the panels) as follows:

    Setting the Border of a Control

  8. On the form, double-click the Close button
  9. Change the document as follows:
    using System;
    using System.Windows.Forms;
    
    namespace ObliqueTriangles10
    {
        public partial class ObliqueTriangles : Form
        {
            public ObliqueTriangles()
            {
                InitializeComponent();
            }
    
            private void rdoAAS_CheckedChanged(object sender, EventArgs e)
            {
                pnlAAS.Visible = true;
                pnlASA.Visible = false;
                pnlSAS.Visible = false;
                pnlSSS.Visible = false;
            }
    
            private void rdoASA_CheckedChanged(object sender, EventArgs e)
            {
                pnlASA.Visible = true;
                pnlAAS.Visible = false;
                pnlSAS.Visible = false;
                pnlSSS.Visible = false;
            }
    
            private void rdoSAS_CheckedChanged(object sender, EventArgs e)
            {
                pnlSAS.Visible = true;
                pnlASA.Visible = false;
                pnlAAS.Visible = false;
                pnlSSS.Visible = false;
            }
    
            private void rdoSSS_CheckedChanged(object sender, EventArgs e)
            {
                pnlSSS.Visible = true;
                pnlSAS.Visible = false;
                pnlASA.Visible = false;
                pnlAAS.Visible = false;
            }
    
            private void ObliqueTriangles_Load(object sender, EventArgs e)
            {
                pnlSSS.Location = pnlSAS.Location = pnlASA.Location = pnlAAS.Location;
                rdoAAS.Checked = true;
                rdoAAS_CheckedChanged(sender, e);
            }
    
            private void btnAASCalculate_Click(object sender, EventArgs e)
            {
                double angle1 = 0.00, angle2 = 0.00, side1 = 0.00;
    
                try
                {
                    angle1 = double.Parse(txtAASAngle1.Text);
                }
                catch (FormatException)
                {
                    MessageBox.Show("You must type a value for the lower left angle of the AAS shape.", "Obliques Triangles");
                }
    
                try
                {
                    angle2 = double.Parse(txtAASAngle2.Text);
                }
                catch (FormatException)
                {
                    MessageBox.Show("You must type a value for the lower right angle of the AAS shape.", "Obliques Triangles");
                }
    
                try
                {
                    side1 = double.Parse(txtAASSide1.Text);
                }
                catch (FormatException)
                {
                    MessageBox.Show("You must type a value for the right side of the AAS shape.", "Obliques Triangles");
                }
    
                // Here, we use the law of sines
                double angle3 = 180 - (angle1 + angle2);
                double side2 = side1 * Math.Sin(angle2 * Math.PI / 180) / Math.Sin(angle1 * Math.PI / 180);
                double side3 = side1 * Math.Sin(angle3 * Math.PI / 180) / Math.Sin(angle1 * Math.PI / 180);
    
                txtAASAngle3.Text = angle3.ToString();
                txtAASSide2.Text = side2.ToString();
                txtAASSide3.Text = side3.ToString();
            }
    
            private void btnASACalculate_Click(object sender, EventArgs e)
            {
                double angle1 = 0.00, side1 = 0.00, angle2 = 0.00;
    
                try
                {
                    angle1 = double.Parse(txtASAAngle1.Text);
                }
                catch (FormatException)
                {
                    MessageBox.Show("You must type a value for the lower left angle of the ASA shape.", "Obliques Triangles");
                }
    
                try
                {
                    side1 = double.Parse(txtASASide1.Text);
                }
                catch (FormatException)
                {
                    MessageBox.Show("You must type a value for the bottom side of the AAS shape.", "Obliques Triangles");
                }
    
                try
                {
                    angle2 = double.Parse(txtASAAngle2.Text);
                }
                catch (FormatException)
                {
                    MessageBox.Show("You must type a value for the lower right angle of the ASA shape.", "Obliques Triangles");
                }
    
                double angle3 = 180 - (angle1 + angle2);
                double side2 = side1 * Math.Sin(angle2 * Math.PI / 180) / Math.Sin(angle1 * Math.PI / 180);
                double side3 = side1 * Math.Sin(angle3 * Math.PI / 180) / Math.Sin(angle1 * Math.PI / 180);
    
                txtASAAngle3.Text = angle3.ToString();
                txtASASide2.Text = side3.ToString();
                txtASASide3.Text = side2.ToString();
            }
    
            private void btnSASCalculate_Click(object sender, EventArgs e)
            {
                double side1 = 0.00, angle1 = 0.00, side2 = 0.00;
    
                try
                {
                    side1 = double.Parse(txtSASSide1.Text);
                }
                catch (FormatException)
                {
                    MessageBox.Show("You must type a value for the left side of the SAS shape.", "Obliques Triangles");
                }
    
                try
                {
                    angle1 = double.Parse(txtSASAngle1.Text);
                }
                catch (FormatException)
                {
                    MessageBox.Show("You must type a value for the top angle of the SAS shape.", "Obliques Triangles");
                }
    
                try
                {
                    side2 = double.Parse(txtSASSide2.Text);
                }
                catch (FormatException)
                {
                    MessageBox.Show("You must type a value for the right side of the SAS shape.", "Obliques Triangles");
                }
    
                // Here, we use the law of cosines
                double side3 = Math.Sqrt((side1 * side1) +
                              (side2 * side2) -
                              (2 * side1 * side2 * Math.Cos(angle1 * Math.PI / 180)));
                double angle2 = Math.Acos(((side3 * side3) +
                              (side2 * side2) -
                              (side1 * side1)) /
                             (2 * side3 * side2)) * 180 / Math.PI;
                double angle3 = 180 - (angle1 + angle2);
    
    
                txtSASSide3.Text = side3.ToString();
                txtSASAngle2.Text = angle2.ToString();
                txtSASAngle3.Text = angle3.ToString();
            }
    
            private void btnSSSCalculate_Click(object sender, EventArgs e)
            {
                double side1 = 0.00, side2 = 0.00, side3 = 0.00;
    
                try
                {
                    side1 = double.Parse(txtSSSSide1.Text);
                }
                catch (FormatException)
                {
                    MessageBox.Show("You must type a value for the left side of the SSS shape.", "Obliques Triangles");
                }
    
                try
                {
                    side2 = double.Parse(txtSSSSide2.Text);
                }
                catch (FormatException)
                {
                    MessageBox.Show("You must type a value for the right side of the SSS shape.", "Obliques Triangles");
                }
    
                try
                {
                    side3 = double.Parse(txtSSSSide3.Text);
                }
                catch (FormatException)
                {
                    MessageBox.Show("You must type a value for the bottom side of the SSS shape.", "Obliques Triangles");
                }
    
                // Here, we use the law of cosines
                double angle1 = Math.Acos(((side3 * side3) +
                               (side2 * side2) -
                               (side1 * side1)) /
                             (2 * side3 * side2)) * 180 / Math.PI;
                double angle2 = Math.Acos(((side3 * side3) +
                               (side1 * side1) -
                               (side2 * side2)) /
                             (2 * side3 * side1)) * 180 / Math.PI;
                double angle3 = 180 - (angle1 + angle2);
    
    
                txtSSSAngle1.Text = angle1.ToString();
                txtSSSAngle2.Text = angle2.ToString();
                txtSSSAngle3.Text = angle3.ToString();
            }
    
            private void btnClose_Click(object sender, EventArgs e)
            {
                Close();
            }
        }
    }
  10. To execute, on the main menu, click Debug -> Start Without Debugging:

    Setting the Border of a Control

  11. In the left text boxes of the AAS panel, enter the values as follows:
    Angle 1:     58
    Angle 2: 28
    Side 1:   6.2
  12. Click the Calculate button:

    Setting the Border of a Control

  13. Click the Calculate button:

    Setting the Border of a Control

  14. In the left text boxes of the ASA panel, enter the values as follows:
    Angle 1: 43
    Side 1:  4.56
    Angle 2: 57
  15. Click the Calculate button:

    Setting the Border of a Control

  16. Click the SAS radio button in the left panel:

    Setting the Border of a Control

  17. In the text boxes, enter the values as follows:
    Side 1:  15
    Angle 1: 28
    Angle 2: 43.6
  18. Click the Calculate button:

    Setting the Border of a Control

  19. Click the SSS radio button in the left panel:

    Setting the Border of a Control

  20. In the text boxes, enter the values as follows:
    Side 1:  210
    Side 2: 75
    Side 3: 172
  21. Click the Calculate button:

    Setting the Border of a Control

  22. Close the form and return to your programming environment

Scrolling a Panel

Besides aesthetic characteristics, a panel provides the ability to scroll, vertically and/or horizontally on its body. Scrolling makes it possible to give the user access to hidden parts that go beyond the (visible) client area of the panel. Here is an example:

Panel

To assist you with scroll bars, the Panel class is equipped with a property named AutoScroll. In reality, this property is inherited from the ScrollableControl class. If you want a ScrollableControl-based control to display the scroll bars, set this property to true. The steps to have the scroll bars on a panel are:

  1. Add a panel to a form and specify the characteristics you want. You must also set the AutoScroll property to true
  2. Add a picture box Picture Box to the above panel (so that the panel is its parent). You should manually align it to the left of its container so that the top-left corner of the panel coincides with the top-left corner of the panel. Set this picture box's Dock property to None. Set its SizeMode to AutoSize.  If you (and most of the time you will) want to programmatically handle the picture box, give it a recognizable name that you can refer to in your code

One of the properties that influences the behavior of scroll bars is AutoScrollMargin. This property controls the area inside of which the scrolling can occur. This property is of type Size, which means it holds the width and the height of the scrollable area. Its default value is (0, 0), which means the whole client area of the parent will be used. If you to limit the area, change the value of this property.


Previous Copyright © 2008-2021, FunctionX Next