Defines the visibility of the headers in the static/edit control portion.
Get
| C# | bool Boolean = object.Main; |
| VB.NET | Boolean = object.Main As Boolean |
| C++ | VARIANT_BOOL Boolean = object->Main; VARIANT_BOOL Boolean = object->GetMain(); |
| C | HRESULT object->get_Main(VARIANT_BOOL* Boolean); |
Put
| C# | bool object.Main = Boolean; |
| VB.NET | object.Main = Boolean As Boolean |
| C++ | VARIANT_BOOL object->Main = Boolean; void object->PutMain(VARIANT_BOOL Boolean); |
| C | HRESULT object->put_Main(VARIANT_BOOL Boolean); |
object
Boolean
Defines the visibility of the headers in the static/edit control portion.
| Boolean | Description |
|---|---|
| True | The column headers are displayed as part of the static portion (edit control portion). |
| False | The column headers are not displayed as part of the static portion (edit control portion). |
The Main property defines the visibility of the headers in the static/edit control portion.
The Headers.DropDown property can be used to define headers for the drop down portion.
It is possible to display headers in both the static portion and drop down portion, this is however not usually recommended.
sampleText.Font = new Font(fontNames.Edit.Text, Convert.ToSingle(fontSizes.Edit.Text), style);
} else
sampleText.Text = "";
}
private void condHeaders_CheckedChanged(object sender, System.EventArgs e)
{
if (condHeaders.Checked) {
fontNames.Headers.Main = true;
fontNames.Headers.DropDown = false;
fontStyles.Headers.Main = true;
fontStyles.Headers.DropDown = false;
fontSizes.Headers.Main = true;
fontSizes.Headers.DropDown = false;
} else {
fontNames.Headers.Main = false;
End If
End Sub
Private Sub condHeaders_CheckedChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles condHeaders.CheckedChanged
' if this event occurs during form initialization, the activeX control
' may not yet be initialized completely, so we have to check for GetOcx()
If Not fontNames.GetOcx() Is Nothing Then
If condHeaders.Checked Then
fontNames.Headers.Main = True
fontNames.Headers.DropDown = False
fontStyles.Headers.Main = True
fontStyles.Headers.DropDown = False
fontSizes.Headers.Main = True
fontSizes.Headers.DropDown = False
Else
fontNames.Headers.Main = False
void CFontDlgDlg::OnCondheaders()
{
ISftBoxPtr vFontNames = m_FontNames.GetControlUnknown();
ISftBoxPtr vFontStyles = m_FontStyles.GetControlUnknown();
ISftBoxPtr vFontSizes = m_FontSizes.GetControlUnknown();
if (m_CondHeaders.GetCheck()) {
vFontNames->Headers->Main = VARIANT_TRUE;
vFontNames->Headers->DropDown = VARIANT_FALSE;
vFontStyles->Headers->Main = VARIANT_TRUE;
vFontStyles->Headers->DropDown = VARIANT_FALSE;
vFontSizes->Headers->Main = VARIANT_TRUE;
vFontSizes->Headers->DropDown = VARIANT_FALSE;
} else {
vFontNames->Headers->Main = VARIANT_FALSE;
vFontNames->Headers->DropDown = VARIANT_TRUE;See Also SftBoxHeaders Object | Object Hierarchy