Hide

SftTree/OCX 7.5 - ActiveX Tree Control

Display
Print

Height Property, SftPictureObject Object

Defines the desired image height.

Syntax

Get

VB.NETHPix = object.Height As Integer
VBHPix = object.Height As Long
C#.NETint HPix = object.Height;
VC++long HPix = object->Height;
long HPix = object->GetHeight();
CHRESULT object->get_Height(long* HPix);

Put

VB.NETobject.Height = HPix As Integer
VBobject.Height = HPix As Long
C#.NETint object.Height = HPix;
VC++long object->Height = HPix;
void object->PutHeight(long HPix);
CHRESULT object->put_Height(long HPix);

object

A SftPictureObject object.

HPix

Defines the desired image height.

Comments

The Height property defines the desired image height.

The desired image height is only used for built-in images (SftPictureObject.Type is sftTypeBuiltin) and color samples (SftPictureObject.Type is sftTypeColorSample). For all image types, the SftPictureObject.ActualHeight and SftPictureObject.ActualWidth properties reflect the image dimensions.

Examples

VB.NET

    End Sub

    Private Sub UpdateColor(ByVal ItemIndex As Integer, ByVal Clr As System.Drawing.Color, ByVal Align As SftTreeHAlignConstants)
        Dim C As SftTreeCell
        C = AxSftTree1.get_Cell(ItemIndex, 0)
        C.Image.SetColorSample(Convert.ToUInt32(ColorTranslator.ToOle(Clr) And &HFFFFFFFF&), _
                                Convert.ToUInt32(ColorTranslator.ToOle(Color.Black) And &HFFFFFFFF&))
        C.Image.Width = 12
        C.Image.Height = 12
        C.ImageHAlign = Align
        PropagateImage(ItemIndex, C.Image)
    End Sub

    Private Sub AddColor(ByVal Text As String, ByVal Clr As Color)
        Dim i As Integer
        i = AxSftTree1.Items.Add(Text)

VB6

    PropagateImage ItemIndex, C.Image
End Sub

Private Sub UpdateColor(ByVal ItemIndex As Integer, ByVal Clr As OLE_COLOR, ByVal Align As SftTreeHAlignConstants)
    Dim C As SftTreeCell
    Set C = SftTree1.Cell(ItemIndex, 0)
    C.Image.SetColorSample Clr, vbBlack
    C.Image.Width = 12
    C.Image.Height = 12
    C.ImageHAlign = Align
    PropagateImage ItemIndex, C.Image
End Sub

Private Sub AddColor(ByVal Text As String, ByVal Clr As OLE_COLOR)
    Dim I As Integer
    I = SftTree1.Items.Add(Text)

C#

            PropagateImage(ItemIndex, C.Image);
        }

        private void UpdateColor(int ItemIndex, System.Drawing.Color Clr, SftTreeHAlignConstants Align)
        {
            SftTreeCell C = axSftTree1.get_Cell(ItemIndex, 0);
            C.Image.SetColorSample((uint) ColorTranslator.ToOle(Clr), (uint) ColorTranslator.ToOle(Color.Black));
            C.Image.Width = 12;
            C.Image.Height = 12;
            C.ImageHAlign = Align;
            PropagateImage(ItemIndex, C.Image);
        }

        private void AddColor(string Text, Color Clr)
        {
            int i;

C++

    PropagateImage(ItemIndex, C->Image);
}

void CPicturesDlg::UpdateColorSample(long ItemIndex, COLORREF Clr, SftTreeHAlignConstants Align)
{
    ISftTreeCellPtr C = m_vTree->Cell[ItemIndex][0];
    C->Image->SetColorSample(Clr, 0x80000000L|COLOR_WINDOWTEXT);
    C->Image->Width = 12;
    C->Image->Height = 12;
    C->ImageHAlign = Align;
    PropagateImage(ItemIndex, C->Image);
}

void CPicturesDlg::AddBuiltinImage(LPCTSTR lpszName, SftPictureImageConstants Appearance, long Width, long Height)
{
    long ItemIndex = m_vTree->Items->Add(lpszName);

See Also SftPictureObject Object | Object Hierarchy


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