SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftMask/OCX 7.0 - Masked Edit Control
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftPrintPreview/DLL 2.0 - Print Preview Control (discontinued)
SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftDirectory 3.5 - File/Folder Control (discontinued)
SftMask/OCX 7.0 - Masked Edit Control
SftOptions 1.0 - Registry/INI Control (discontinued)
SftPrintPreview/OCX 1.0 - Print Preview Control (discontinued)
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftTabs/NET 6.0 - Tab Control (discontinued)
SftTree/NET 2.0 - Tree Control
Defines the graphic used to display an expandable item's plus/minus graphic.
Get
VB.NET | refImageObj = object.PlusMinusImageExpandable As SftPictureObject |
VB | Set refImageObj = object.PlusMinusImageExpandable As SftPictureObject |
C#.NET | SftPictureObject refImageObj = object.PlusMinusImageExpandable; |
VC++ | ISftPictureObject* refImageObj = object->PlusMinusImageExpandable; ISftPictureObject* refImageObj = object->GetPlusMinusImageExpandable(); |
C | HRESULT object->get_PlusMinusImageExpandable(ISftPictureObject** refImageObj); |
Put
VB.NET | object.PlusMinusImageExpandable = refImageObj As SftPictureObject |
VB | object.PlusMinusImageExpandable = refImageObj As SftPictureObject |
C#.NET | SftPictureObject object.PlusMinusImageExpandable = refImageObj; |
VC++ | ISftPictureObject* object->PlusMinusImageExpandable = refImageObj; void object->PutPlusMinusImageExpandable(ISftPictureObject* refImageObj); |
C | HRESULT object->put_PlusMinusImageExpandable(ISftPictureObject* refImageObj); |
object
A SftTreeItems object.
refImageObj
Defines the graphic used to display an expandable item's plus/minus graphic. Only bitmaps are supported (GDI+ images, icons, metafiles, ImageLists, etc. are not supported).
The PlusMinusImageExpandable property defines the graphic used to display an expandable item's plus/minus graphic.
All items which are expandable 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 PlusMinusImageExpandable and Items.PlusMinusImageExpanded define valid graphics. The Items.PlusMinusImageLeaf property is optional.
All graphics used in a tree control as PlusMinusImageExpandable, Items.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 PlusMinusImageExpandable, Items.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 PlusMinusImageExpandable property can be set to the value Nothing (NULL). Plus/minus graphics are then no longer displayed.
' Make columns optimal 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
.ColumnsObj.MakeOptimal ' 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
// Make columns optimal 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(); } }
void CBookTableDlg::OnCancel() { 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(); } }
See Also SftTreeItems Object | Object Hierarchy