Hide

SftBox/OCX 5.0 - Combo Box Control

Display
Print

SftBoxCell.Text Property

Defines the cell's text.

Syntax

Get

VB.NETString = object.Text As String
VBString = object.Text As String
C#.NETstring String = object.Text;
VC++_bstr_t String = object->Text;
_bstr_t String = object->GetText();
CHRESULT object->get_Text(BSTR* String);

Put

VB.NETobject.Text = String As String
VBobject.Text = String As String
C#.NETstring object.Text = String;
VC++_bstr_t object->Text = String;
void object->PutText(_bstr_t String);
CHRESULT object->put_Text(BSTR String);

object

A SftBoxCell object.

String

Defines the cell's text.

Comments

The Text property defines the cell's text.

The default cell text alignment for a column is defined using the Column.CellHAlign and Column.CellVAlign properties. A cell can override the default using the Cell.TextHAlign and Cell.TextVAlign properties.

The font used for the cell text is defined using the control's Font and Cell.Font properties.

A cell can contain a single line of text or multiple lines of text based on the Column.CellMultiline property.

The Items.Add, Items.Insert and Items.InsertAfter methods add new items. The text specified when adding new items always defines the cell text for the first or only column (column 0).

Examples

VB.NET

        AxSftBox1.Items.Sort(-1, 0, SftBoxSortConstants.sortSftBoxDescending)
    End If
End Sub

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    Dim ItemIndex As Integer
    ItemIndex = AxSftBox1.Items.Add("Supported Picture Types")
    AxSftBox1.get_Cell(ItemIndex, 1).Text = "SftBox/OCX supports numerous image types, GDI+ images, such as bitmaps, icons, ImageLists and also offers numerous built-in images."

    ' add GDI+ samples

    ItemIndex = AxSftBox1.Items.Add("GDI+ Images")
    AxSftBox1.get_Item(ItemIndex).Level = 1
    AxSftBox1.get_Cell(ItemIndex, 1).Text = "All GDI+ images are supported, like GIF, JPEG, Exif, PNG, TIFF and device-independent bitmaps (up to 64bpp) with semi-transparent and translucent areas."

VB6

Private Sub Form_Load()
    Dim ItemIndex As Integer, I As Integer
    Dim C As Integer, Count As Integer

    SortDirection = False

    With SftBox1
        ItemIndex = .Items.Add("Supported Picture Types")
        .Cell(ItemIndex, 1).Text = "SftBox/OCX supports numerous image types, such as GDI+ images, bitmaps, icons, ImageLists and also offers numerous built-in images."

        ' add GDI+ samples

        ItemIndex = .Items.Add("GDI+ Images")
        .Item(ItemIndex).Level = 1
        .Cell(ItemIndex, 1).Text = "All GDI+ images are supported, like GIF, JPEG, Exif, PNG, TIFF and device-independent bitmaps (up to 64bpp) with semi-transparent and translucent areas."

C#

        axSftBox1.Items.Sort(-1, 0, SftBoxSortConstants.sortSftBoxAscending);
    else
        axSftBox1.Items.Sort(-1, 0, SftBoxSortConstants.sortSftBoxDescending);
}

private void Form1_Load(object sender, System.EventArgs e) {

    int ItemIndex = axSftBox1.Items.Add("Supported Picture Types");
    axSftBox1.get_Cell(ItemIndex, 1).Text = "SftBox/OCX supports numerous image types, such as GDI+ images, bitmaps, icons, ImageLists and also offers numerous built-in images.";

    // add GDI+ samples

    ItemIndex = axSftBox1.Items.Add("GDI+ Images");
    axSftBox1.get_Item(ItemIndex).Level = 1;
    axSftBox1.get_Cell(ItemIndex, 1).Text = "All GDI+ images are supported, like GIF, JPEG, Exif, PNG, TIFF and device-independent bitmaps (up to 64bpp) with semi-transparent and translucent areas.";

C++

    SetIcon(m_hIcon, TRUE);            // Set big icon
    SetIcon(m_hIcon, FALSE);        // Set small icon

    m_vBox = m_Box.GetControlUnknown();
    ASSERT(m_vBox != NULL);

    long ItemIndex = m_vBox->Items->Add("Supported Picture Types");

    m_vBox->Cell[ItemIndex][1]->Text = _T("SftBox/OCX supports numerous image types, such as GDI+ images, bitmaps, icons, ImageLists and also offers numerous built-in images.");

    // add GDI+ samples

    ItemIndex = m_vBox->Items->Add(_T("GDI+ Images"));
    m_vBox->Item[ItemIndex]->Level = 1;
    m_vBox->Cell[ItemIndex][1]->Text = _T("All GDI+ images are supported, like GIF, JPEG, Exif, PNG, TIFF and device-independent bitmaps (up to 64bpp) with semi-transparent and translucent areas.");

See Also SftBoxCell Object | Object Hierarchy


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