💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
<p><strong><span style="font-size:16px;">Create 方法</span></strong></p> <p><span style="line-height:1.78571;">这个方法是在容器上创建一个树控件</span></p> <p><span></span></p> <p class="label"><b>语法</b></p> <p><span class="emp"><i>object</i></span>.<b>Create( Container, &nbsp;FocusButton , Style, LineStyle , IconSize , WindowsThemeStyle)&nbsp;</b></p> <p><span class="emp"><i>object </i></span>所在处代表一个<span><span><span>对象表达式</span></span></span>,其值是<span>“</span>应用于<span>”</span>列表中的一个对象。<span></span></p> <p></p> <p class="label"><b>参数</b></p> <p><table style="width:100%;" cellpadding="2" cellspacing="0" border="1" class="table table-kindeditor table-bordered "><tbody><tr><td><span style="font-weight:700;">Container</span><br /> </td> <td>容器,Access的控件容器,来安放控件</td> </tr> <tr><td><span style="font-weight:700;">FocusButton&nbsp;</span><br /> </td> <td>按钮,Access按钮控件</td> </tr> <tr><td><span style="font-weight:700;">Style</span><br /> </td> <td>样式,创建<span style="font-family:'sans serif', tahoma, verdana, helvetica;line-height:21.5385px;">TreeView</span>的样式</td> </tr> <tr><td><span style="font-weight:700;">LineStyle&nbsp;</span><br /> </td> <td>线条样式,显示<span style="font-family:'sans serif', tahoma, verdana, helvetica;line-height:21.5385px;">TreeView</span>的线条样式,</td> </tr> <tr><td><span style="font-weight:700;">IconSize&nbsp;</span><br /> </td> <td>图标的大小,显示TreeView的的图表大小</td> </tr> <tr><td><span style="font-weight:700;">WindowsThemeStyle</span><br /> </td> <td>系统主题风格,显示TreeView控件是以哪种主题样式显示</td> </tr> </tbody> </table> </p> <p><br /> </p> <p class="label"><b>说明</b></p> <p><b>通过Create方法,可以在不同的容器上创建TreeView。避免办法的问题导致创建失败。</b></p> <p>例:在窗体上创建树控件,使用矩形框作为树的容器</p> <pre class="prettyprint lang-vb">Private Sub Form_Load() Set TreeView0 = New TreeView '实例化TreeView对象 With TreeView0 .Create Me.Box109, Me.Command110, , Me.CmbStyle, Me.CmbLineStyle ' ' Call pAddImage '添加图像 .AddImageGroup Me.ImgList0 .Echo False ' .Font.Name = "微软雅黑" '字体 ' .HotTracking = True '热跟踪 ' '失去焦点时保持选择的节点高亮 ' .SelectedNoFocusBackcolor = .SelectedBackcolor ' .SelectedNoFocusForecolor = .SelectedForecolor Call pAddNode '添加树节点 .Echo True Me.CmbStyle = .Style Me.TxtIndentation = .Indentation Me.ChkFullRowSelect = .FullRowSelect Me.ChkHotTracking = .HotTracking '获得树控件选项的颜色值,显示在文本框中 Me.TxtSelectedForecolor = .SelectedForecolor Me.TxtSelectedBackcolor = .SelectedBackcolor Me.TxtSelectedNoFocusForecolor = .SelectedNoFocusForecolor Me.TxtSelectedNoFocusBackcolor = .SelectedNoFocusBackcolor End With End Sub </pre> <br />