HeaderPane
Main
Hide
Share Link
Print

SftPictureObject.Height Property

Defines the desired image height.

Syntax

Get

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

Put

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

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 View entire sample code

    PropagateImage(ItemIndex, C.Image)
End Sub

Private Sub UpdateColor(ByVal ItemIndex As Integer, ByVal Clr As System.Drawing.Color, ByVal Align As SftBoxHAlignConstants)
    Dim C As SftBoxCell
    C = AxSftBox1.get_Cell(ItemIndex, 0)
    C.Image.SetColorSample(OLECvt.ToOleColor(Clr), OLECvt.ToOleColor(Color.Black))
    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 = AxSftBox1.Items.Add(Text)

VB6 View entire sample code

    PropagateImage ItemIndex, C.Image
End Sub

Private Sub UpdateColor(ByVal ItemIndex As Integer, ByVal Clr As OLE_COLOR, ByVal Align As SftBoxHAlignConstants)
    Dim C As SftBoxCell
    Set C = SftBox1.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 = SftBox1.Items.Add(Text)

C# View entire sample code

    PropagateImage(ItemIndex, C.Image);
}

private void UpdateColor(int ItemIndex, System.Drawing.Color Clr, SftBoxHAlignConstants Align)
{
    SftBoxCell C = axSftBox1.get_Cell(ItemIndex, 0);
    C.Image.SetColorSample(OLECvt.ToOleColor(Clr), OLECvt.ToOleColor(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++ View entire sample code

    PropagateImage(ItemIndex, C->Image);
}

void CPicturesDlg::UpdateColorSample(long ItemIndex, COLORREF Clr, SftBoxHAlignConstants Align)
{
    ISftBoxCellPtr C = m_vBox->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_vBox->Items->Add(lpszName);

See Also SftPictureObject Object | Object Hierarchy


Last Updated 11/04/2026 - (email)
© 2026 Softel vdm, Inc.