|
/* All code is written my me,Ben Ratzlaff and is available for any free use except where noted.
*I assume no responsibility for how anyone uses the information available*/
using System;
using System.Windows.Forms;
using System.Drawing;
using CustomPropGrid;
namespace TestCustPropGrid
{
/// <summary>
/// A form whose sole purpose is to hold a CustomPropertyGrid
/// </summary>
public class PropertyForm:System.Windows.Forms.Form
{
private CustomPropertyGrid propertyGrid;
public PropertyForm(string typeName,Settings settings):this()
{
propertyGrid.TypeName=typeName;
propertyGrid.Settings=settings;
}
public PropertyForm()
{
InitializeComponent();
}
#region Windows Form Designer generated code
private void InitializeComponent()
{
this.propertyGrid = new CustomPropGrid.CustomPropertyGrid();
this.SuspendLayout();
//
// propertyGrid
//
this.propertyGrid.CommandsVisibleIfAvailable = true;
this.propertyGrid.Dock = System.Windows.Forms.DockStyle.Fill;
this.propertyGrid.LargeButtons = false;
this.propertyGrid.LineColor = System.Drawing.SystemColors.ScrollBar;
this.propertyGrid.Name = "propertyGrid";
this.propertyGrid.Size = new System.Drawing.Size(232, 325);
this.propertyGrid.TabIndex = 0;
this.propertyGrid.Text = "PropertyGrid";
this.propertyGrid.ViewBackColor = System.Drawing.SystemColors.Window;
this.propertyGrid.ViewForeColor = System.Drawing.SystemColors.WindowText;
//
// PropertyForm
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(232, 325);
this.Controls.AddRange(new System.Windows.Forms.Control[] {
this.propertyGrid});
this.Name = "PropertyForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
this.Text = "Custom PropertyGrid";
this.ResumeLayout(false);
}
#endregion
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.