HeaderPane
Main
Hide
Share Link
Print

PlusMinusImageExpanded Property, SftTreeItems Object

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

Syntax

Get

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

Put

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

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

C# View entire sample code

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

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

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

VB.NET View entire sample code

        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.Picture = OLECvt.ToIPictureDisp(PlusMinusImageList.Images(0))
            AxSftTree1.Items.PlusMinusImageExpanded.Picture = OLECvt.ToIPictureDisp(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

C++ View entire sample code

{
    CDialog::OnCancel();
}

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

void CBookTableDlg::OnCheckUsePlainClicked() 

VB6 View entire sample code

        ' 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()

See Also SftTreeItems Object | Object Hierarchy


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