Hide

SftTree/OCX 7.5 - ActiveX Tree Control

Display
Print

ImageHAlign Property, SftTreeRowHeader Object

Defines the horizontal alignment of the graphic in this row header.

Syntax

Get

VB.NETStyle = object.ImageHAlign As SftTreeHAlignConstants
VBStyle = object.ImageHAlign As SftTreeHAlignConstants
C#.NETSftTreeHAlignConstants Style = object.ImageHAlign;
VC++enum SftTreeHAlignConstants Style = object->ImageHAlign;
enum SftTreeHAlignConstants Style = object->GetImageHAlign();
CHRESULT object->get_ImageHAlign(enum SftTreeHAlignConstants* Style);

Put

VB.NETobject.ImageHAlign = Style As SftTreeHAlignConstants
VBobject.ImageHAlign = Style As SftTreeHAlignConstants
C#.NETSftTreeHAlignConstants object.ImageHAlign = Style;
VC++enum SftTreeHAlignConstants object->ImageHAlign = Style;
void object->PutImageHAlign(enum SftTreeHAlignConstants Style);
CHRESULT object->put_ImageHAlign(enum SftTreeHAlignConstants Style);

object

A SftTreeRowHeader object.

Style

Defines the horizontal alignment of the graphic in this row header.

NameValueDescription
halignSftTreeLeft0The graphic is on the left of the row header text.
halignSftTreeCenter1The graphic is centered in the row header. The row header text is not displayed.
halignSftTreeRight2The graphic is on the right of the row header text.

Comments

The ImageHAlign property defines the horizontal alignment of the graphic in this row header.

Row header graphics are defined using the RowHeader.Image property.

Examples

VB.NET

        If e.rowIndex Mod 7 = 0 Then
            e.itemObject.Item.Image.NETImageObject = imageListBitmaps.Images((e.rowIndex + 9) Mod 10)
            e.itemObject.Item.LabelImage.NETImageObject = imageListBitmaps.Images((e.rowIndex + 1) Mod 10)
        End If
        If e.rowIndex Mod 13 = 0 Then
            e.itemObject.Item.RowHeader.Image.NETImageObject = imageListBitmaps.Images((e.rowIndex + 5) Mod 10)
        End If
        If e.rowIndex Mod 11 = 0 Then
            e.itemObject.Item.RowHeader.ImageHAlign = SftTreeHAlignConstants.halignSftTreeRight
        End If
        If e.rowIndex Mod 9 = 0 Then
            e.itemObject.Item.Cell(1).Image.NETImageObject = imageListBitmaps.Images((e.rowIndex + 3) Mod 10)
        End If
        If e.rowIndex Mod 7 = 0 Then
            e.itemObject.Item.Cell(0).Image.NETImageObject = imageListBitmaps.Images((e.rowIndex + 2) Mod 10)
            e.itemObject.Item.Cell(0).ImageHAlign = SftTreeHAlignConstants.halignSftTreeRight

VB6

    If RowIndex Mod 7 = 0 Then
        Set ItemObject.Item.Image.Picture = Image1((RowIndex + 9) Mod 10).Picture
        Set ItemObject.Item.LabelImage.Picture = Image1((RowIndex + 1) Mod 10).Picture
    End If
    If RowIndex Mod 13 = 0 Then
        Set ItemObject.Item.RowHeader.Image.Picture = Image1((RowIndex + 5) Mod 10).Picture
    End If
    If RowIndex Mod 11 = 0 Then
        ItemObject.Item.RowHeader.ImageHAlign = halignSftTreeRight
    End If
    If RowIndex Mod 9 = 0 Then
        Set ItemObject.Item.Cell(1).Image.Picture = Image1((RowIndex + 3) Mod 10).Picture
    End If
    If RowIndex Mod 7 = 0 Then
        Set ItemObject.Item.Cell(0).Image.Picture = Image1((RowIndex + 2) Mod 10).Picture
        ItemObject.Item.Cell(0).ImageHAlign = halignSftTreeRight

C#

                e.itemObject.Item.get_Cell(1).Font.Bold = true;
            if (e.rowIndex % 7 == 0) {
                e.itemObject.Item.Image.NETImageObject = imageListBitmaps.Images[(e.rowIndex + 9) % 10];
                e.itemObject.Item.LabelImage.NETImageObject = imageListBitmaps.Images[(e.rowIndex + 1) % 10];
            }
            if (e.rowIndex % 13 == 0)
                e.itemObject.Item.RowHeader.Image.NETImageObject = imageListBitmaps.Images[(e.rowIndex + 5) % 10];
            if (e.rowIndex % 11 == 0)
                e.itemObject.Item.RowHeader.ImageHAlign = SftTreeHAlignConstants.halignSftTreeRight;
            if (e.rowIndex % 9 == 0)
                e.itemObject.Item.get_Cell(1).Image.NETImageObject = imageListBitmaps.Images[(e.rowIndex + 3) % 10];
            if (e.rowIndex % 7 == 0) {
                e.itemObject.Item.get_Cell(0).Image.NETImageObject = imageListBitmaps.Images[(e.rowIndex + 2) % 10];
                e.itemObject.Item.get_Cell(0).ImageHAlign = SftTreeHAlignConstants.halignSftTreeRight;
            }
        }

C++

    }
    if (RowIndex % 7 == 0) {
        pItemObj->Item->Image->SetImageListH((OLE_HANDLE)(HIMAGELIST)m_Bitmaps, (short)((RowIndex + 9) % 10));
        pItemObj->Item->LabelImage->SetImageListH((OLE_HANDLE)(HIMAGELIST)m_Bitmaps, (short)((RowIndex + 1) % 10));
    }
    if (RowIndex % 13 == 0)
        pItemObj->Item->RowHeader->Image->SetImageListH((OLE_HANDLE)(HIMAGELIST)m_Bitmaps, (short)((RowIndex + 5) % 10));
    if (RowIndex % 11 == 0)
        pItemObj->Item->RowHeader->ImageHAlign = halignSftTreeRight;
    if (RowIndex % 9 == 0)
        pItemObj->Item->Cell[1]->Image->SetImageListH((OLE_HANDLE)(HIMAGELIST)m_Bitmaps, (short)((RowIndex + 3) % 10));
    if (RowIndex % 7 == 0) {
        pItemObj->Item->Cell[0]->Image->SetImageListH((OLE_HANDLE)(HIMAGELIST)m_Bitmaps, (short)((RowIndex + 2) % 10));
        pItemObj->Item->Cell[0]->ImageHAlign = halignSftTreeRight;
    }
}

See Also SftTreeRowHeader Object | Object Hierarchy


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