Hide

SftTree/OCX 7.5 - ActiveX Tree Control

Display
Print

PlusMinusImageExpanded Property, SftTreeItems Object

Defines the graphic used to display an expanded item's plus/minus graphic.

Syntax

Get

VB.NETrefImageObj = object.PlusMinusImageExpanded As SftPictureObject
VBSet refImageObj = object.PlusMinusImageExpanded As SftPictureObject
C#.NETSftPictureObject refImageObj = object.PlusMinusImageExpanded;
VC++ISftPictureObject* refImageObj = object->PlusMinusImageExpanded;
ISftPictureObject* refImageObj = object->GetPlusMinusImageExpanded();
CHRESULT object->get_PlusMinusImageExpanded(ISftPictureObject** refImageObj);

Put

VB.NETobject.PlusMinusImageExpanded = refImageObj As SftPictureObject
VBobject.PlusMinusImageExpanded = refImageObj As SftPictureObject
C#.NETSftPictureObject object.PlusMinusImageExpanded = refImageObj;
VC++ISftPictureObject* object->PlusMinusImageExpanded = refImageObj;
void object->PutPlusMinusImageExpanded(ISftPictureObject* refImageObj);
CHRESULT object->put_PlusMinusImageExpanded(ISftPictureObject* refImageObj);

object

A SftTreeItems object.

refImageObj

Defines the graphic used to display an expanded item's plus/minus graphic. Only bitmaps are supported (GDI+ images, icons, metafiles, ImageLists, etc. are not supported).

Comments

The PlusMinusImageExpanded property defines the graphic used to display an expanded item's plus/minus graphic.

All items which are expanded will be displayed with this plus/minus graphic. Individual items cannot override the plus/minus graphic.

Plus/minus graphics are not shown until the properties Items.PlusMinusImageExpandable and PlusMinusImageExpanded define valid graphics. The Items.PlusMinusImageLeaf property is optional.

All graphics used in a tree control as Items.PlusMinusImageExpandable, PlusMinusImageExpanded and Items.PlusMinusImageLeaf properties at the same time must be the same size (height and width). The dimensions of the graphics are used to calculate the minimum dimension for items, so graphics used as plus/minus graphics are never clipped vertically. To change the plus/minus graphic size, the plus/minus graphics properties Items.PlusMinusImageExpandable, PlusMinusImageExpanded and Items.PlusMinusImageLeaf must be set to the value Nothing (NULL) before assigning new plus/minus graphics.

If an item is disabled (see Item.Enabled property), the plus/minus graphic is drawn in a "grayed" fashion, if it is based on a bitmap. Other image types, like color samples, .NET image objects, etc., must be explicitly replaced with a grayed image if a different rendering of a disabled image is desired.

The PlusMinusImageExpanded property can be set to the value Nothing (NULL). Plus/minus graphics are then no longer displayed.

Examples

VB.NET

        AxSftTree1.ColumnsObj.MakeOptimal()
        ' allow horizontal scrolling
        AxSftTree1.Items.RecalcHorizontalExtent()
    End Sub

    Private Sub PlusMinusCheckBox_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PlusMinusCheckBox.CheckedChanged
        If PlusMinusCheckBox.Checked Then
            AxSftTree1.Items.PlusMinusImageExpandable.NETImageObject = PlusMinusImageList.Images(0)
            AxSftTree1.Items.PlusMinusImageExpanded.NETImageObject = PlusMinusImageList.Images(1)
        Else
            AxSftTree1.Items.PlusMinusImageExpandable.Clear()
            AxSftTree1.Items.PlusMinusImageExpanded.Clear()
        End If
    End Sub

    Private Sub UglyCheckBox_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles UglyCheckBox.CheckedChanged

VB6

        ' allow horizontal scrolling
        .Items.RecalcHorizontalExtent
    End With
End Sub

Private Sub ShowPlusMin_Click()
    If ShowPlusMin.Value = 0 Then
        SftTree1.Items.PlusMinusImageExpandable.Clear
        SftTree1.Items.PlusMinusImageExpanded.Clear
    Else
        Set SftTree1.Items.PlusMinusImageExpandable.Picture = Plus.Picture
        Set SftTree1.Items.PlusMinusImageExpanded.Picture = Minus.Picture
    End If
End Sub

Private Sub Ugly_Click()

C#

            axSftTree1.ColumnsObj.MakeOptimal();
            // allow horizontal scrolling
            axSftTree1.Items.RecalcHorizontalExtent();
        }

        private void plusMinusCheckBox_CheckedChanged(object sender, System.EventArgs e) {
            if (plusMinusCheckBox.Checked) {
                axSftTree1.Items.PlusMinusImageExpandable.NETImageObject = plusMinusImageList.Images[0];
                axSftTree1.Items.PlusMinusImageExpanded.NETImageObject = plusMinusImageList.Images[1];
            } else {
                axSftTree1.Items.PlusMinusImageExpandable.Clear();
                axSftTree1.Items.PlusMinusImageExpanded.Clear();
            }
        }

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

C++

{
    CDialog::OnCancel();
}

void CBookTableDlg::OnCheckShowPlusMinClicked()
{
    if (m_CheckPlusMin.GetCheck()) {
        m_vTree->Items->PlusMinusImageExpandable->PutBitmapHandle((OLE_HANDLE)(HBITMAP)m_Plus);
        m_vTree->Items->PlusMinusImageExpanded->PutBitmapHandle((OLE_HANDLE)(HBITMAP)m_Minus);
    } else {
        m_vTree->Items->PlusMinusImageExpandable->Clear();
        m_vTree->Items->PlusMinusImageExpanded->Clear();
    }
}

void CBookTableDlg::OnCheckUsePlainClicked()

See Also SftTreeItems Object | Object Hierarchy


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


Spring Break!

Our offices will be closed this week (March 18 through March 22).

We'll be back March 24 to address any pending sales and support issues.