Hide

SftBox/OCX 5.0 - Combo Box Control

Display
Print

SftBox.Edit Property

Returns the SftBoxEdit object.

Syntax

Get

VB.NETrefEditObj = object.Edit As SftBoxEdit
VBSet refEditObj = object.Edit As SftBoxEdit
C#.NETSftBoxEdit refEditObj = object.Edit;
VC++ISftBoxEdit* refEditObj = object->Edit;
ISftBoxEdit* refEditObj = object->GetEdit();
CHRESULT object->get_Edit(ISftBoxEdit** refEditObj);

object

A SftBox object.

refEditObj

Returns a reference to the control's SftBoxEdit object.

Comments

The Edit property returns the SftBoxEdit object.

The properties and behavior of the edit control portion of the control can be updated using the returned SftBoxEdit object.

Examples

VB.NET

    fontNames.BulkUpdate = False
    fontNames.Columns.MakeOptimal(0)
    fontNames.Items.RecalcHorizontalExtent(0)
End Sub

Private Sub UpdateFontStyles()
    ' add all styles for the current font name
    If fontNames.Items.Selection >= 0 Then
        Dim OldText As String = fontStyles.Edit.Text
        fontStyles.Items.AddFontStyles(fontNames.get_Cell(fontNames.Items.Selection, 0).Text, 0, "", "")
        Dim index As Integer = fontStyles.Items.Find(OldText, 0, 0, False, True, True)
        If index < 0 Then index = 0
        fontStyles.Items.Selection = index
    Else
        fontStyles.Items.Clear()
    End If

VB6

        PerformSort FontNames
    End If
End Sub

Private Sub UpdateStyles()
    Dim OldText As String, Index As Long
    ' add all styles for the current font name
    If FontNames.Items.Selection >= 0 Then
        OldText = FontStyles.Edit.Text
        FontStyles.Items.AddFontStyles FontNames.Cell(FontNames.Items.Selection, 0).Text, 0, "", ""
        Index = FontStyles.Items.Find(OldText, 0, 0, False, True, True)
        If Index < 0 Then Index = 0
        FontStyles.Items.Selection = Index
    Else
        FontStyles.Items.Clear
    End If

C#

    fontNames.Columns.MakeOptimal(0);
    fontNames.Items.RecalcHorizontalExtent(0);
}

private void UpdateFontStyles()
{
    // add all styles for the current font name
    if (fontNames.Items.Selection >= 0) {
        string OldText = fontStyles.Edit.Text;
        fontStyles.Items.AddFontStyles(fontNames.get_Cell(fontNames.Items.Selection,0).Text, 0, "", "");
        int index = fontStyles.Items.Find(OldText, 0, 0, false, true, true);
        if (index < 0) index = 0;
        fontStyles.Items.Selection = index;
    } else
        fontStyles.Items.Clear();
    PerformSort(fontStyles, SftBoxSortConstants.sortSftBoxAscending);

C++

    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);
    vFontSizes->Headers->PutFont(NULL);

See Also SftBox Object | Object Hierarchy


Last Updated 08/13/2020 - (email)
© 2024 Softel vdm, Inc.