⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 super3dlegend.ctl

📁 都是基于VB所做的程序集合,值得大家作为实践的参考资料.
💻 CTL
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomctl.ocx"
Begin VB.UserControl Super3DLegend 
   ClientHeight    =   5340
   ClientLeft      =   0
   ClientTop       =   0
   ClientWidth     =   3090
   ScaleHeight     =   5340
   ScaleWidth      =   3090
   Begin MSComctlLib.ImageList ImageList1 
      Left            =   1260
      Top             =   4740
      _ExtentX        =   1005
      _ExtentY        =   1005
      BackColor       =   -2147483643
      MaskColor       =   12632256
      _Version        =   393216
   End
   Begin MSComctlLib.TreeView tvwLegend 
      Height          =   4155
      Left            =   240
      TabIndex        =   0
      Top             =   375
      Width           =   2505
      _ExtentX        =   4419
      _ExtentY        =   7329
      _Version        =   393217
      Style           =   7
      Checkboxes      =   -1  'True
      ImageList       =   "ImageList1"
      Appearance      =   0
   End
End
Attribute VB_Name = "Super3DLegend"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = True
Option Explicit
Private m_Super3D As Super3D
Private m_bChange As Boolean
Public Event Modified()

Private Sub tvwLegend_NodeCheck(ByVal Node As MSComctlLib.Node)
    m_Super3D.Layer3Ds(Node.Key).Visible = Node.Checked
    RaiseEvent Modified
End Sub

Private Sub UserControl_Resize()
    tvwLegend.Left = 0
    tvwLegend.Top = 0
    tvwLegend.Height = Height
    tvwLegend.Width = Width
End Sub

Public Sub Connect(objSuper3D As Object)
    Set m_Super3D = objSuper3D
End Sub

Public Sub Refresh()
    Call LayersToTree
End Sub

Private Sub LayersToTree()  '生成图层到树,直接在m_Super3D中取
    Dim iImageIndex As Integer
    Dim AddNode As Node
    Dim objLayer As so3DLayer
    Dim i As Integer
    If Not m_Super3D Is Nothing Then
        tvwLegend.Nodes.Clear
        For i = 1 To m_Super3D.Layer3Ds.Count
            Set objLayer = m_Super3D.Layer3Ds(i)
            Set AddNode = tvwLegend.Nodes.Add(, , objLayer.Name, objLayer.Caption)
            AddNode.Checked = objLayer.Visible
        Next i
    End If
    tvwLegend.Refresh
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -