Hide

SftTree/OCX 7.5 - ActiveX Tree Control

Display
Print

MaxHeightPix Property, SftTreeItem Object

Defines the maximum height of the item.

Syntax

Get

VB.NETMaxPix = object.MaxHeightPix As Integer
VBMaxPix = object.MaxHeightPix As Long
C#.NETint MaxPix = object.MaxHeightPix;
VC++long MaxPix = object->MaxHeightPix;
long MaxPix = object->GetMaxHeightPix();
CHRESULT object->get_MaxHeightPix(long* MaxPix);

Put

VB.NETobject.MaxHeightPix = MaxPix As Integer
VBobject.MaxHeightPix = MaxPix As Long
C#.NETint object.MaxHeightPix = MaxPix;
VC++long object->MaxHeightPix = MaxPix;
void object->PutMaxHeightPix(long MaxPix);
CHRESULT object->put_MaxHeightPix(long MaxPix);

object

A SftTreeItem object.

MaxPix

Defines the maximum height of the item in pixels. If 0 is specified, the item uses the height required, so the item is not clipped vertically.

Comments

The MaxHeightPix property defines the maximum height of the item.

If the item is larger than the defined maximum height, it is truncated and clipped.

This property has no effect when fixed height items are used (see Items.Style). The Items.MinHeightPix and Items.MaxHeightPix properties can be used for fixed height items to define the minimum and maximum height for all item.

The Items.Lines property can be used to define the number of text lines used for item height calculation.

The Item.MinHeightPix property defines the minimum height of an item.

Examples

VB.NET

    ' Web Browser
    webBrowser1.Navigate("http://www.softelvdm.com")
    Dim Item As SftTreeItem = AxSftTree1.get_Item(5)
    Dim Cell As SftTreeCell = Item.Cell(1)
    Cell.AttachContentWindow(webBrowserPanel.Handle, SftTreeContentWindowStyleConstants.contentWindowSftTreeNone)
    Cell.Text = ""
    Item.MinHeightPix = 300 ' always exactly 300 pixels
    Item.MaxHeightPix = 300 ' always exactly 300 pixels

    ' Form
    Dim f As FormSmall = New FormSmall()
    AxSftTree1.get_Item(6).Cell(1).AttachContentWindow(f.Handle, SftTreeContentWindowStyleConstants.contentWindowSftTreeKeepSize)
    AxSftTree1.get_Item(6).Cell(1).Text = ""

    AxSftTree1.RowHeaders.MakeOptimal() ' Make row header width optimal, so text and pictures are not clipped horizontally.
    AxSftTree1.ColumnsObj.MakeOptimal() ' Make all columns optimal

VB6

    WebBrowser1.Navigate "http://www.softelvdm.com"
    Dim Item As SftTreeItem
    Dim Cell As SftTreeCell
    Set Item = SftTree1.Item(5)
    Set Cell = Item.Cell(1)
    Cell.AttachContentWindow WebBrowserPictureBox.hWnd, contentWindowSftTreeNone
    Cell.Text = ""
    Item.MinHeightPix = 300 ' always exactly 300 pixels
    Item.MaxHeightPix = 300 ' always exactly 300 pixels

    SftTree1.RowHeaders.MakeOptimal ' Make row header width optimal, so text and pictures are not clipped horizontally.
    SftTree1.ColumnsObj.MakeOptimal ' Make all columns optimal

    ' Form
    Set SavedForm = New Form2
    SftTree1.Item(6).Cell(1).AttachContentWindow SavedForm.hWnd, contentWindowSftTreeKeepSize

C#

            // Web Browser
            webBrowser1.Navigate("http://www.softelvdm.com");
            SftTreeItem Item= axSftTree1.get_Item(5);
            SftTreeCell Cell = Item.get_Cell(1);
            Cell.AttachContentWindow((long)webBrowserPanel.Handle, SftTreeContentWindowStyleConstants.contentWindowSftTreeNone);
            Cell.Text = "";
            Item.MinHeightPix = 300; // always exactly 300 pixels
            Item.MaxHeightPix = 300; // always exactly 300 pixels

            // Form
            FormSmall f = new FormSmall();
            axSftTree1.get_Item(6).get_Cell(1).AttachContentWindow((long)f.Handle, SftTreeContentWindowStyleConstants.contentWindowSftTreeKeepSize);
            axSftTree1.get_Item(6).get_Cell(1).Text = "";

            axSftTree1.RowHeaders.MakeOptimal(); // Make row header width optimal, so text and pictures are not clipped horizontally.
            axSftTree1.ColumnsObj.MakeOptimal(); // Make all columns optimal

C++

    if (!m_IEDialog.Create(IDD_IE_DIALOG, &m_Tree) || !m_IEDialog.HaveWebBrowser()) {
         m_vTree->Item[5]->Cell[1]->Text = _T("Internet Explorer control could not be instantiated - maybe Internet Explorer is not installed\n\n")
                                  _T("Internet Explorer is available at www.microsoft.com.");
    } else {
        ISftTreeItemPtr pItem = m_vTree->Item[5];
        ISftTreeCellPtr pCell = pItem->Cell[1];
        pCell->Text = _T("Internet Explorer");
        pItem->MinHeightPix = 300; // always exactly 300 pixels
        pItem->MaxHeightPix = 300; // always exactly 300 pixels
        pCell->AttachContentWindow((int) m_IEDialog.m_hWnd, contentWindowSftTreeNone);
    }

    // Simple Dialog

    // Create the dialog
    m_SimpleDialog.Create(IDD_SIMPLEDIALOG, &m_Tree);

See Also SftTreeItem Object | Object Hierarchy


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