SftBox/OCX 5.0 Documentation

Display
Print

SftBox.Headers Property

Returns the SftBoxHeaders object.

Syntax

Get

VB.NETrefHeadersObj = object.Headers As SftBoxHeaders
VBSet refHeadersObj = object.Headers As SftBoxHeaders
C#.NETSftBoxHeaders refHeadersObj = object.Headers;
VC++ISftBoxHeaders* refHeadersObj = object->Headers;
ISftBoxHeaders* refHeadersObj = object->GetHeaders();
CHRESULT object->get_Headers(ISftBoxHeaders** refHeadersObj);

object

A SftBox object.

refHeadersObj

Returns a reference to the control's SftBoxHeaders object.

Comments

The Headers property returns the SftBoxHeaders object.

The default properties and behavior of all column headers can be updated using the returned SftBoxColumns object.

A SftBoxHeader object for a specific column can be retrieved using the Header property.

Examples

VB.NET

    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

VB6

End Sub

Private Sub Command1_Click()
    Unload Form1
End Sub

Private Sub CondHeaders_Click()
    If CondHeaders.Value = 0 Then
        FontNames.Headers.Main = False
        FontNames.Headers.DropDown = True
        FontStyles.Headers.Main = False
        FontStyles.Headers.DropDown = True
        FontSizes.Headers.Main = False
        FontSizes.Headers.DropDown = True
    Else
        FontNames.Headers.Main = True

C#

        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;

C++

    //  when the application's main window is not a dialog
    SetIcon(m_hIcon, TRUE);            // Set big icon
    SetIcon(m_hIcon, FALSE);        // Set small icon

    // reset font for all combo boxes to use the form's
    // default font
    ISftBoxPtr vFontNames = m_FontNames.GetControlUnknown();
    vFontNames->PutFont(NULL);
    vFontNames->Headers->PutFont(NULL);
    vFontNames->Edit->PutFont(NULL);
    ISftBoxPtr vFontStyles = m_FontStyles.GetControlUnknown();
    vFontStyles->PutFont(NULL);
    vFontStyles->Headers->PutFont(NULL);
    vFontStyles->Edit->PutFont(NULL);
    ISftBoxPtr vFontSizes = m_FontSizes.GetControlUnknown();
    vFontSizes->PutFont(NULL);

See Also SftBox Object | Object Hierarchy


Last Updated 09/02/2018 - (email)
© 2019 Softel vdm, Inc.