You can set the appearance of the outline of the drop-down list. The following figures show the types of outlines (or border) styles.
Outline (Border) Style | Example |
---|---|
Fixed, three-dimensional (default) | |
Fixed, single-line | |
None |
For more details, refer to the DefaultRowFilter class DropDownBorderStyle property and the .NET BorderStyle enumeration.
Example
C# | Copy Code |
---|---|
// Activate the automatic filtering features. fpSpread1.ActiveSheet.Columns[0].AllowAutoFilter = true; // Change the drop-down list style to "Single Line". fpSpread1.ActiveSheet.RowFilter.DropDownBorderStyle = BorderStyle.FixedSingle; fpSpread1.ActiveSheet.DefaultStyle.CellType = new FarPoint.Win.Spread.CellType.TextCellType(); fpSpread1.ActiveSheet.SetText(0, 0, "Fender"); fpSpread1.ActiveSheet.SetText(1, 0, "Gibson"); fpSpread1.ActiveSheet.SetText(2, 0, "Fender"); fpSpread1.ActiveSheet.SetText(3, 0, "Ibanez"); fpSpread1.ActiveSheet.SetText(4, 0, "Gibson"); fpSpread1.ActiveSheet.SetText(5, 0, "YAMAHA"); fpSpread1.ActiveSheet.SetText(0, 1, "AST-100 DMC"); fpSpread1.ActiveSheet.SetText(1, 1, "Les Paul Standard Double Cut Plus"); fpSpread1.ActiveSheet.SetText(2, 1, "ST58-70TX"); fpSpread1.ActiveSheet.SetText(3, 1, "AGS83B"); fpSpread1.ActiveSheet.SetText(4, 1, "Les Paul Supreme"); fpSpread1.ActiveSheet.SetText(5, 1, "ATTITUDE-Limited II"); fpSpread1.ActiveSheet.SetColumnWidth(0, 90); fpSpread1.ActiveSheet.SetColumnWidth(1, 210); |
VB | Copy Code |
---|---|
' Activate the automatic filtering features. FpSpread1.ActiveSheet.Columns(0).AllowAutoFilter = True ' Change the drop-down list style to "Single Line". FpSpread1.ActiveSheet.RowFilter.DropDownBorderStyle = BorderStyle.FixedSingle FpSpread1.ActiveSheet.DefaultStyle.CellType = New FarPoint.Win.Spread.CellType.TextCellType FpSpread1.ActiveSheet.SetText(0, 0, "Fender") FpSpread1.ActiveSheet.SetText(1, 0, "Gibson") FpSpread1.ActiveSheet.SetText(2, 0, "Fender") FpSpread1.ActiveSheet.SetText(3, 0, "Ibanez") FpSpread1.ActiveSheet.SetText(4, 0, "Gibson") FpSpread1.ActiveSheet.SetText(5, 0, "YAMAHA") FpSpread1.ActiveSheet.SetText(0, 1, "AST-100 DMC") FpSpread1.ActiveSheet.SetText(1, 1, "Les Paul Standard Double Cut Plus") FpSpread1.ActiveSheet.SetText(2, 1, "ST58-70TX") FpSpread1.ActiveSheet.SetText(3, 1, "AGS83B") FpSpread1.ActiveSheet.SetText(4, 1, "Les Paul Supreme") FpSpread1.ActiveSheet.SetText(5, 1, "ATTITUDE-Limited II") FpSpread1.ActiveSheet.SetColumnWidth(0, 90) FpSpread1.ActiveSheet.SetColumnWidth(1, 210) |
Return to Customizing the Filter List.