GrapeCity.Win.Spread.InputMan.CellType.GcComboBoxCellType gcCombo = new GrapeCity.Win.Spread.InputMan.CellType.GcComboBoxCellType();
GrapeCity.Win.Spread.InputMan.CellType.ListItemInfo listItem1 = new GrapeCity.Win.Spread.InputMan.CellType.ListItemInfo();
GrapeCity.Win.Spread.InputMan.CellType.ListItemInfo listItem2 = new GrapeCity.Win.Spread.InputMan.CellType.ListItemInfo();
GrapeCity.Win.Spread.InputMan.CellType.ListItemInfo listItem3 = new GrapeCity.Win.Spread.InputMan.CellType.ListItemInfo();
GrapeCity.Win.Spread.InputMan.CellType.ListItemInfo listItem4 = new GrapeCity.Win.Spread.InputMan.CellType.ListItemInfo();
GrapeCity.Win.Spread.InputMan.CellType.ListItemInfo listItem5 = new GrapeCity.Win.Spread.InputMan.CellType.ListItemInfo();
GrapeCity.Win.Spread.InputMan.CellType.ListItemInfo listItem6 = new GrapeCity.Win.Spread.InputMan.CellType.ListItemInfo();
GrapeCity.Win.Spread.InputMan.CellType.ListItemInfo listItem7 = new GrapeCity.Win.Spread.InputMan.CellType.ListItemInfo();
GrapeCity.Win.Spread.InputMan.CellType.ListItemInfo listItem8 = new GrapeCity.Win.Spread.InputMan.CellType.ListItemInfo();
GrapeCity.Win.Spread.InputMan.CellType.ListItemInfo listItem9 = new GrapeCity.Win.Spread.InputMan.CellType.ListItemInfo();
GrapeCity.Win.Spread.InputMan.CellType.ItemTemplateInfo itemTemplate1 = new GrapeCity.Win.Spread.InputMan.CellType.ItemTemplateInfo();
GrapeCity.Win.Spread.InputMan.CellType.ItemTemplateInfo itemTemplate2 = new GrapeCity.Win.Spread.InputMan.CellType.ItemTemplateInfo();
GrapeCity.Win.Spread.InputMan.CellType.ListColumnInfo listColumn1 = new GrapeCity.Win.Spread.InputMan.CellType.ListColumnInfo();
GrapeCity.Win.Spread.InputMan.CellType.ListColumnInfo listColumn2 = new GrapeCity.Win.Spread.InputMan.CellType.ListColumnInfo();
Image img1 = Image.FromFile("C:\\Program Files (x86)\\GrapeCity\\Image.ico");
Image img2 = Image.FromFile("C:\\Program Files (x86)\\GrapeCity\\Image.jpeg");
System.Windows.Forms.ImageList imageList = new System.Windows.Forms.ImageList();
imageList.TransparentColor = System.Drawing.Color.Transparent;
imageList.Images.Add("0", img1);
imageList.Images.Add("1", img2);
gcCombo.AcceptsArrowKeys = FarPoint.Win.SuperEdit.AcceptsArrowKeys.AllArrows;
gcCombo.AcceptsCrLf = GrapeCity.Win.Spread.InputMan.CellType.CrLfMode.Filter;
gcCombo.AcceptsTabChar = GrapeCity.Win.Spread.InputMan.CellType.TabCharMode.Filter;
gcCombo.AllowSpace = GrapeCity.Win.Spread.InputMan.CellType.AllowSpace.Both;
gcCombo.AlternateText.DisplayNull.Text = "DisplayNull";
gcCombo.AlternateText.DisplayNull.ForeColor = Color.Red;
gcCombo.AlternateText.Null.Text = "Null";
gcCombo.AlternateText.Null.ForeColor = Color.RosyBrown;
gcCombo.AutoComplete.MatchingMode = GrapeCity.Win.Spread.InputMan.CellType.AutoCompleteMatchingMode.MatchAll;
gcCombo.AutoComplete.CandidateListItemFont = SystemFonts.DefaultFont;
gcCombo.AutoComplete.HighlightMatchedText = true;
gcCombo.AutoComplete.HighlightStyle.Font = SystemFonts.MenuFont;
gcCombo.AutoComplete.HighlightStyle.ForeColor = Color.BlueViolet;
gcCombo.AutoCompleteCustomSource = new System.Windows.Forms.AutoCompleteStringCollection() { "GcTextBox", "GcNumber", "GcComboBox", "GcDateTime" };
gcCombo.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest;
gcCombo.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource;
gcCombo.AutoConvert = true;
gcCombo.AutoFilter.Enabled = true;
gcCombo.AutoFilter.Interval = 250;
gcCombo.AutoFilter.MatchingMode = GrapeCity.Win.Spread.InputMan.CellType.AutoCompleteMatchingMode.MatchAll;
gcCombo.AutoFilter.MatchingSource = GrapeCity.Win.Spread.InputMan.CellType.FilterMatchingSource.AllSubItems;
gcCombo.AutoFilter.MaxFilteredItems = 10;
gcCombo.AutoFilter.MinimumPrefixLength = 1;
gcCombo.AutoGenerateColumns = true;
gcCombo.AutoSelect = true;
gcCombo.DropDown.AllowDrop = true;
gcCombo.DropDown.AllowResize = true;
gcCombo.DropDown.AutoHideTouchKeyboard = GrapeCity.Win.Spread.InputMan.CellType.AutoHideTouchKeyboard.HideAndReshow;
gcCombo.DropDown.AutoWidth = true;
gcCombo.DropDown.ClosingAnimation = GrapeCity.Win.Spread.InputMan.CellType.DropDownAnimation.Fade;
gcCombo.DropDown.Direction = GrapeCity.Win.Spread.InputMan.CellType.DropDownDirection.Default;
gcCombo.DropDown.OpeningAnimation = GrapeCity.Win.Spread.InputMan.CellType.DropDownAnimation.Extend;
gcCombo.DropDown.ShowShadow = true;
gcCombo.DropDownMaxHeight = 200;
gcCombo.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDown;
gcCombo.EditMode = GrapeCity.Win.Spread.InputMan.CellType.EditMode.Insert;
gcCombo.Ellipsis = GrapeCity.Win.Spread.InputMan.CellType.EllipsisMode.EllipsisEnd;
gcCombo.EllipsisString = "....";
gcCombo.ExitOnLastChar = true;
gcCombo.FocusPosition = GrapeCity.Win.Spread.InputMan.CellType.EditorBaseFocusCursorPosition.Inherit;
gcCombo.FormatString = String.Empty;
gcCombo.ImageAlign = System.Windows.Forms.HorizontalAlignment.Center;
gcCombo.ImageList = imageList;
gcCombo.ImageWidth = 50;
listItem1.Image = 0;
listItem1.SubItems.AddRange(new GrapeCity.Win.Spread.InputMan.CellType.SubItemInfo[] {
new GrapeCity.Win.Spread.InputMan.CellType.SubItemInfo("GcTextBox"),
new GrapeCity.Win.Spread.InputMan.CellType.SubItemInfo("テキストコントロール")
});
listItem2.Image = 1;
listItem2.SubItems.AddRange(new GrapeCity.Win.Spread.InputMan.CellType.SubItemInfo[] {
new GrapeCity.Win.Spread.InputMan.CellType.SubItemInfo("GcMask"),
new GrapeCity.Win.Spread.InputMan.CellType.SubItemInfo("マスクコントロール")
});
listItem3.Image = 0;
listItem3.SubItems.AddRange(new GrapeCity.Win.Spread.InputMan.CellType.SubItemInfo[] {
new GrapeCity.Win.Spread.InputMan.CellType.SubItemInfo("GcCharMask"),
new GrapeCity.Win.Spread.InputMan.CellType.SubItemInfo("キャラクタボックスコントロール")
});
listItem4.Image = 1;
listItem4.SubItems.AddRange(new GrapeCity.Win.Spread.InputMan.CellType.SubItemInfo[] {
new GrapeCity.Win.Spread.InputMan.CellType.SubItemInfo("GcDate"),
new GrapeCity.Win.Spread.InputMan.CellType.SubItemInfo("日付コントロール")
});
listItem5.Image = 0;
listItem5.SubItems.AddRange(new GrapeCity.Win.Spread.InputMan.CellType.SubItemInfo[] {
new GrapeCity.Win.Spread.InputMan.CellType.SubItemInfo("GcTimeSpan"),
new GrapeCity.Win.Spread.InputMan.CellType.SubItemInfo("タイムスパンコントロール")
});
listItem6.Image = 1;
listItem6.SubItems.AddRange(new GrapeCity.Win.Spread.InputMan.CellType.SubItemInfo[] {
new GrapeCity.Win.Spread.InputMan.CellType.SubItemInfo("GcNumber"),
new GrapeCity.Win.Spread.InputMan.CellType.SubItemInfo("数値コントロール")
});
listItem7.Image = 0;
listItem7.SubItems.AddRange(new GrapeCity.Win.Spread.InputMan.CellType.SubItemInfo[] {
new GrapeCity.Win.Spread.InputMan.CellType.SubItemInfo("GcComboBox"),
new GrapeCity.Win.Spread.InputMan.CellType.SubItemInfo("コンボコントロール")
});
listItem8.Image = 1;
listItem8.SubItems.AddRange(new GrapeCity.Win.Spread.InputMan.CellType.SubItemInfo[] {
new GrapeCity.Win.Spread.InputMan.CellType.SubItemInfo("GcListBox"),
new GrapeCity.Win.Spread.InputMan.CellType.SubItemInfo("リストコントロール")
});
listItem9.Image = 0;
listItem9.SubItems.AddRange(new GrapeCity.Win.Spread.InputMan.CellType.SubItemInfo[] {
new GrapeCity.Win.Spread.InputMan.CellType.SubItemInfo("GcRichTextBox"),
new GrapeCity.Win.Spread.InputMan.CellType.SubItemInfo("リッチテキストコントロール")
});
gcCombo.Items.AddRange(new GrapeCity.Win.Spread.InputMan.CellType.ListItemInfo[] {
listItem1,
listItem2,
listItem3,
listItem4,
listItem5,
listItem6,
listItem7,
listItem8,
listItem9});
listColumn1.AutoWidth = true;
listColumn1.Header.Text = "コントロール";
listColumn1.Header.Image = img1;
listColumn2.AutoWidth = true;
listColumn2.Header.Text = "名称";
listColumn2.Header.Image = img2;
gcCombo.ListColumns.AddRange(new GrapeCity.Win.Spread.InputMan.CellType.ListColumnInfo[] {
listColumn1,
listColumn2});
gcCombo.ListDefaultColumn.AutoWidth = true;
gcCombo.ListDefaultColumn.DataDisplayType = GrapeCity.Win.Spread.InputMan.CellType.DataDisplayType.Text;
gcCombo.ListDefaultColumn.Header.AllowResize = true;
gcCombo.ListDefaultColumn.Header.BackColor = Color.WhiteSmoke;
gcCombo.ListDefaultColumn.Header.ContentAlignment = ContentAlignment.MiddleCenter;
gcCombo.ListDefaultColumn.Header.Ellipsis = true;
gcCombo.ListDefaultColumn.Header.ForeColor = Color.OrangeRed;
gcCombo.ListDefaultColumn.Header.GradientEffect = new GrapeCity.Win.Spread.InputMan.CellType.GradientEffect(GrapeCity.Win.Spread.InputMan.CellType.GradientStyle.Circular, GrapeCity.Win.Spread.InputMan.CellType.GradientDirection.Center, Color.CadetBlue, Color.FloralWhite);
gcCombo.ListDefaultColumn.Header.Image = img1;
gcCombo.ListDefaultColumn.Header.ImageTextSpace = 40;
gcCombo.ListDefaultColumn.Header.Text = "DefaultColumn";
gcCombo.ListDefaultColumn.Header.TextAttachAlignment = GrapeCity.Win.Spread.InputMan.CellType.AttachAlignment.RightMiddle;
gcCombo.ListDefaultColumn.Header.TextEffect = GrapeCity.Win.Spread.InputMan.CellType.TextEffect.InsetLite;
gcCombo.ListDefaultColumn.Visible = true;
gcCombo.ListDefaultColumn.Width = 500; //No effect when auto width = true
gcCombo.ListDefaultColumn.DefaultSubItem.ContentAlignment = ContentAlignment.MiddleCenter;
gcCombo.ListDefaultColumn.DefaultSubItem.Ellipsis = false;
gcCombo.ListDefaultColumn.DefaultSubItem.Padding = new System.Windows.Forms.Padding(5);
gcCombo.ListDefaultColumn.DefaultSubItem.WordWrap = true;
gcCombo.ListDescriptionFormat = "[0] : [1]";
gcCombo.ListDescriptionSubItemIndex = 1; //No effect with ListDescriptionFormat
gcCombo.ListDisabledItemStyle.BackColor = Color.Gray;
gcCombo.ListDisabledItemStyle.ForeColor = Color.White;
gcCombo.ListDisabledItemStyle.GradientEffect = null;
gcCombo.ListGradientEffect = new GrapeCity.Win.Spread.InputMan.CellType.GradientEffect(GrapeCity.Win.Spread.InputMan.CellType.GradientStyle.Elliptical, GrapeCity.Win.Spread.InputMan.CellType.GradientDirection.Forward, Color.White, Color.AliceBlue);
gcCombo.ListGridLines.HorizontalLines = new GrapeCity.Win.Spread.InputMan.CellType.Line(GrapeCity.Win.Spread.InputMan.CellType.LineStyle.Dotted, Color.Black);
gcCombo.ListGridLines.VerticalLines = new GrapeCity.Win.Spread.InputMan.CellType.Line(GrapeCity.Win.Spread.InputMan.CellType.LineStyle.Dotted, Color.Black);
gcCombo.ListHeaderPane.Height = 100; //No effect when AutoHeight = true
gcCombo.ListHeaderPane.AutoHeight = true;
gcCombo.ListHeaderPane.BackColor = Color.Brown;
gcCombo.ListHeaderPane.GradientEffect = null;
gcCombo.ListHeaderPane.Visible = true;
itemTemplate1.AutoItemHeight = true;
itemTemplate1.BackColor = Color.Beige;
itemTemplate1.Height = 30;
itemTemplate1.Indent = 10;
itemTemplate2.AutoItemHeight = true;
itemTemplate2.BackColor = Color.Crimson;
itemTemplate2.Height = 30;
gcCombo.ListItemTemplates.Add(itemTemplate1);
gcCombo.ListItemTemplates.Add(itemTemplate2);
gcCombo.ListSelectedItemStyle.BackColor = Color.DarkBlue;
gcCombo.ListSelectedItemStyle.ForeColor = Color.White;
gcCombo.MaxDropDownItems = 5;
gcCombo.MaxLength = 10;
gcCombo.RecommendedValue = "Recommended Value";
gcCombo.ShowRecommendedValue = true;
gcCombo.ScrollBarMode = GrapeCity.Win.Spread.InputMan.CellType.ScrollBarMode.Automatic;
gcCombo.ScrollBars = System.Windows.Forms.ScrollBars.Both;
gcCombo.ShowItemTip = true;
gcCombo.ShowListBoxImage = true;
gcCombo.ShowOverflowTip = true;
gcCombo.ShowTouchToolBar = GrapeCity.Win.Spread.InputMan.CellType.TouchToolBarDisplayOptions.TapGripper;
gcCombo.StatusBar.Visible = true;
gcCombo.StatusBar.Text = "StatusBar";
fpSpread1.ActiveSheet.Cells[0, 0].CellType = gcCombo;