GrapeCity.Win.MultiRow Namespace : DomainUpDownCell Class |
<ToolboxItemFilterAttribute(FilterString="GrapeCity.Win.MultiRow.Template7", FilterType=ToolboxItemFilterType.Custom Or _ ToolboxItemFilterType.Prevent Or _ ToolboxItemFilterType.Require)> <ToolboxBitmapAttribute()> <SRDescriptionAttribute("Displays a single string value that the user selects from a list of items by clicking up and down buttons in cell.")> <DesignerAttribute(DesignerBaseTypeName="System.ComponentModel.Design.IDesigner", DesignerTypeName="GrapeCity.Win.MultiRow.Design.DomainUpDownCellDesigner,GrapeCity.Win.MultiRow.Design, Version=7.20.20141.0, Culture=neutral, PublicKeyToken=0f7a722ee3c2bdd9")> <DefaultPropertyAttribute("Items")> Public Class DomainUpDownCell Inherits Cell
Dim instance As DomainUpDownCell
[ToolboxItemFilter(FilterString="GrapeCity.Win.MultiRow.Template7", FilterType=ToolboxItemFilterType.Custom | ToolboxItemFilterType.Prevent | ToolboxItemFilterType.Require)] [ToolboxBitmap()] [SRDescription("Displays a single string value that the user selects from a list of items by clicking up and down buttons in cell.")] [Designer(DesignerBaseTypeName="System.ComponentModel.Design.IDesigner", DesignerTypeName="GrapeCity.Win.MultiRow.Design.DomainUpDownCellDesigner,GrapeCity.Win.MultiRow.Design, Version=7.20.20141.0, Culture=neutral, PublicKeyToken=0f7a722ee3c2bdd9")] [DefaultProperty("Items")] public class DomainUpDownCell : Cell
The DomainUpDownCell class is a special type of Cell that displays and sets a text string from a list of choices. The user can select the string by clicking up and down buttons to move through a list, or by pressing the up and down arrow keys, or by typing a string that matches an item in the list.
The DomainUpDownCell is similar to the list box or combo box, but it takes up little space.
Notes to Inheritors:
When you derive from DomainUpDownCell and add new properties to the derived class, be sure to override the Clone method to copy the new properties during cloning operations. You should also call the base class's Clone method so that the properties of the base class are copied to the new cell.
using System; using System.Windows.Forms; using System.Drawing; namespace GrapeCity.Win.MultiRow.SampleCode { public class DomainUpDownCellDemo : Form { private GcMultiRow gcMultiRow1 = new GcMultiRow(); private FlowLayoutPanel panel = new FlowLayoutPanel(); public DomainUpDownCellDemo() { this.Text = "DomainUpDownCell Demo"; this.Size = new Size(450, 350); // Initial flow layout panel and add to form. this.panel.Dock = DockStyle.Left; this.panel.Size = new Size(200, 200); this.panel.FlowDirection = FlowDirection.TopDown; this.panel.WrapContents = false; this.panel.Padding = new Padding(5); this.Controls.Add(panel); // Add MultiRow to form this.gcMultiRow1.Dock = DockStyle.Left; this.Controls.Add(this.gcMultiRow1); label.Height = 50; label.Dock = DockStyle.Bottom; label.BackColor = SystemColors.Info; label.Text = "Please Click one button to set the corresponding Property."; this.Controls.Add(label); this.Load += new EventHandler(Form1_Load); InitButton(); } private void Form1_Load(object sender, EventArgs e) { DomainUpDownCell domainUpDownCell1 = new DomainUpDownCell(); domainUpDownCell1.Items.AddRange(new int[] { 7, 3, 5, 1 }); Template template1 = Template.CreateGridTemplate(new Cell[] { domainUpDownCell1 }); gcMultiRow1.Template = template1; gcMultiRow1.RowCount = 2; }
Imports System Imports System.Windows.Forms Imports System.Drawing Imports GrapeCity.Win.MultiRow Public Class DomainUpDownCellDemo Inherits Form Private gcMultiRow1 As New GcMultiRow() Private panel As New FlowLayoutPanel() Public Sub New() Me.Text = "DomainUpDownCell Demo" Me.Size = New Size(450, 350) ' Initial flow layout panel and add to form. Me.panel.Dock = DockStyle.Left Me.panel.Size = New Size(200, 200) Me.panel.FlowDirection = FlowDirection.TopDown Me.panel.WrapContents = False Me.panel.Padding = New Padding(5) Me.Controls.Add(panel) ' Add MultiRow to form Me.gcMultiRow1.Dock = DockStyle.Left Me.Controls.Add(Me.gcMultiRow1) label.Height = 50 label.Dock = DockStyle.Bottom label.BackColor = SystemColors.Info label.Text = "Please Click one button to set the corresponding Property." Me.Controls.Add(label) InitButton() End Sub Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load Dim domainUpDownCell1 As New DomainUpDownCell() domainUpDownCell1.Items.AddRange(New Integer() {7, 3, 5, 1}) Dim template1 As Template = Template.CreateGridTemplate(New Cell() {domainUpDownCell1}) gcMultiRow1.Template = template1 gcMultiRow1.RowCount = 2 End Sub
System.Object
System.MarshalByRefObject
System.ComponentModel.Component
GrapeCity.Win.MultiRow.Cell
GrapeCity.Win.MultiRow.DomainUpDownCell
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2