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 maximum graphics sizes when using a virtual data source.
VB.NET | object.VirtualImageSizes(ByVal ItemImageWidth As Integer, ByVal ItemImageHeight As Integer, ByVal CellImageWidth As Integer, ByVal CellImageHeight As Integer, ByVal LabelImageWidth As Integer, ByVal LabelImageHeight As Integer, ByVal RowHeaderImageWidth As Integer, ByVal RowHeaderImageHeight As Integer) |
VB | object.VirtualImageSizes(ByVal ItemImageWidth As Integer, ByVal ItemImageHeight As Integer, ByVal CellImageWidth As Integer, ByVal CellImageHeight As Integer, ByVal LabelImageWidth As Integer, ByVal LabelImageHeight As Integer, ByVal RowHeaderImageWidth As Integer, ByVal RowHeaderImageHeight As Integer) |
C#.NET | void object.VirtualImageSizes(int ItemImageWidth, int ItemImageHeight, int CellImageWidth, int CellImageHeight, int LabelImageWidth, int LabelImageHeight, int RowHeaderImageWidth, int RowHeaderImageHeight); |
VC++ | HRESULT object->VirtualImageSizes(int ItemImageWidth, int ItemImageHeight, int CellImageWidth, int CellImageHeight, int LabelImageWidth, int LabelImageHeight, int RowHeaderImageWidth, int RowHeaderImageHeight); |
C | HRESULT object->raw_VirtualImageSizes(int ItemImageWidth, int ItemImageHeight, int CellImageWidth, int CellImageHeight, int LabelImageWidth, int LabelImageHeight, int RowHeaderImageWidth, int RowHeaderImageHeight); |
object
ItemImageWidth
The maximum width of an item graphic. 0 can be specified if item graphics are not used.
ItemImageHeight
The maximum height of an item graphic. 0 can be specified if item graphics are not used.
CellImageWidth
The maximum width of a cell graphic. 0 can be specified if cell graphics are not used.
CellImageHeight
The maximum height of a cell graphic. 0 can be specified if cell graphics are not used.
LabelImageWidth
The maximum width of a label graphic. 0 can be specified if label graphics are not used.
LabelImageHeight
The maximum height of a label graphic. 0 can be specified if label graphics are not used.
RowHeaderImageWidth
The maximum width of a row header graphic. 0 can be specified if row headers are not used.
RowHeaderImageHeight
The maximum height of a row header graphic. 0 can be specified if row headers are not used.
The VirtualImageSizes method defines the maximum graphics sizes when using a virtual data source.
After defining a tree control as a virtual tree control using the VirtualMode property, the (maximum) graphics sizes must be defined using the VirtualImageSizes method, so the graphics are enabled and so the control can reserve sufficient space for each graphics component.
In a fixed height tree control, VirtualImageSizes defines the exact size of each graphics component. In a variable height tree control, the graphics must define the maximum size of each graphics component.
If a graphic component is not used, 0 can be specified as its height and width. In this case the graphic component is not displayed even if the virtual data source callback provides a valid image.
If the tree control is not a virtual tree control (items have been added using Items.Add or Items.Insert), this method will fail.
Private Sub Command1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Command1.Click Application.Exit() End Sub Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load m_PicCount = 0 AxSftTree1.VirtualMode = True AxSftTree1.VirtualCount(10000000) AxSftTree1.VirtualImageSizes(16, 16, 16, 16, 16, 16, 16, 16) ' Make columns and row headers optimal ' but do this at the end of the list, because our sample ' data is larger at the end AxSftTree1.Items.TopIndex = AxSftTree1.Items.Count - 1 AxSftTree1.ColumnsObj.MakeOptimal() AxSftTree1.RowHeaders.MakeOptimal() AxSftTree1.Items.RecalcHorizontalExtent()
End End Sub Private Sub Form_Load() PicCount = 0 With SftTree1 .VirtualMode = True .VirtualCount 10000000 .VirtualImageSizes 16, 16, 16, 16, 16, 16, 16, 16 ' Make columns and row headers optimal ' but do this at the end of the list, because our sample ' data is larger at the end .Items.TopIndex = .Items.Count - 1 .ColumnsObj.MakeOptimal .RowHeaders.MakeOptimal .Items.RecalcHorizontalExtent
private void Command1_Click(object sender, System.EventArgs e) { Application.Exit(); } private void Form1_Load(object sender, System.EventArgs e) { m_PicCount = 0; axSftTree1.VirtualMode = true; axSftTree1.VirtualCount(10000000); axSftTree1.VirtualImageSizes(16, 16, 16, 16, 16, 16, 16, 16); // Make columns and row headers optimal // but do this at the end of the list, because our sample // data is larger at the end axSftTree1.Items.TopIndex = axSftTree1.Items.Count - 1; axSftTree1.ColumnsObj.MakeOptimal(); axSftTree1.RowHeaders.MakeOptimal(); axSftTree1.Items.RecalcHorizontalExtent();
SetIcon(m_hIcon, TRUE); // Set big icon SetIcon(m_hIcon, FALSE); // Set small icon m_vTree = m_Tree.GetControlUnknown(); ASSERT(m_vTree != NULL); m_vTree->VirtualMode = VARIANT_TRUE; m_vTree->VirtualCount(10000000); m_vTree->VirtualImageSizes(16, 16, 16, 16, 16, 16, 16, 16); // Make columns and row headers optimal // but do this at the end of the list, because our sample // data is larger at the end m_vTree->Items->TopIndex = m_vTree->Items->Count - 1; m_vTree->ColumnsObj->MakeOptimal(); m_vTree->RowHeaders->MakeOptimal(); m_vTree->Items->RecalcHorizontalExtent();
See Also SftTree Object | Object Hierarchy