| List for WinForms Task-Based Help > Changing the Font Style of a Column > Undo Changing the Font Style of a Column |
To undo changing the font style of a column, either set the font in the designer to Microsoft Sans Serif or in code by adding the following code. In this example the code was added to the Undo button's Click event.
To write code in Visual Basic
| Visual Basic |
Copy Code
|
|---|---|
Me.C1List1.Splits(0).DisplayColumns.Item("Company").Style.Font = Font
|
|
To write code in C#
| C# |
Copy Code
|
|---|---|
this.c1List1.Splits[0].DisplayColumns["Company"].Style.Font = Font; |
|
When the Undo button is clicked, the font in the Company column is returned to the default font.
