多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
<p><strong><span style="font-size:16px;">AddImageGroup 方法</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>AddImageGroup(PictureSource, IconWidth], [IconHeight ], [TransparentColor)&nbsp;<br /> </b></p> <p><b><span class="emp" style="font-weight:normal;line-height:1.78571;"><i>object </i></span><span style="font-weight:normal;line-height:1.78571;">所在处代表一个</span><span style="font-weight:normal;line-height:1.78571;">对象表达式</span><span style="font-weight:normal;line-height:1.78571;">,其值是</span><span style="font-weight:normal;line-height:1.78571;">“</span><span style="font-weight:normal;line-height:1.78571;">应用于</span><span style="font-weight:normal;line-height:1.78571;">”</span><span style="font-weight:normal;line-height:1.78571;">列表中的一个对象。</span></b></p> <p><b><span style="font-weight:normal;line-height:1.78571;"><br /> </span></b></p> <p><br /> </p> <p><span></span></p> <p><br /> </p> <p class="label" style="font-size:12px;font-family:'Helvetica Neue', Helvetica, Tahoma, Arial, sans-serif;">参数</p> <span style="color:#333333;font-family:'Helvetica Neue', Helvetica, Tahoma, Arial, sans-serif;"></span> <table cellpadding="2" cellspacing="0" border="1" class="table table-kindeditor table-bordered " style="width:600px;color:#333333;font-family:'Helvetica Neue', Helvetica, Tahoma, Arial, sans-serif;font-size:14px;background-color:#FFFFFF;"><tbody><tr><td>参数值</td> <td>描述</td> </tr> <tr><td><span style="font-weight:200;">PictureSource</span><br /> </td> <td>设置图标的路径,或者图标的数据源</td> </tr> <tr><td><span style="font-weight:300;">IconWidth&nbsp;</span><br /> </td> <td>图标的宽度</td> </tr> <tr><td><span style="font-weight:200;">IconHeight</span><br /> </td> <td>图标的高度</td> </tr> <tr><td><span style="font-weight:300;">TransparentColor</span><br /> </td> <td>获取或设置被视为透明的颜色<br /> </td> </tr> </tbody> </table> <p><br /> </p> <p class="label"><b>说明</b></p> <p>AddImageGroup 和AddImage的参数都是一样的,一样是创建节点的图标。而<span>AddImageGroup 是创建一个图标组块。所有节点都使用组块中的图标。</span></p> 例:为刚创建的TreeView控件,添加图标组 <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 />