欢 迎 光 临 页面载入中....
页面载入中....
  3S工作室
页面载入中....
最新日志
页面载入中....
 最新回复
页面载入中....
 最新留言
页面载入中....
 友情链接

 工作室管理
 
页面载入中....
 日志搜索

 站点日历
 
页面载入中....

 工作室信息
页面载入中....


·TOCControl中调出SymbolSelector     -|汪自军 发表于 2008-4-12 20:45:00
 Private Sub tocCtrl_OnDoubleClick(ByVal Button As Long, ByVal shift As Long, ByVal x As Long, ByVal y As Long)
  Dim pMap As IMap
  Dim pLayer As ILayer
  Dim pOther As IUnknown
  Dim pItem As esriTOCControlItem
  Dim pIndex As Variant

  'Determine what kind of item has been clicked on
  tocCtrl.HitTest x, y, pItem, pMap, pLayer, pOther, pIndex
  'Only layer items can have their labels edited
  If pItem = esriTOCControlItemLegendClass Then
    Dim pLC As ILegendClass
    Dim pLG As ILegendGroup
    If TypeOf pOther Is ILegendGroup Then
       Set pLG = pOther
    End If
    Set pLC = pLG.Class(CLng(pIndex))
    Dim pSym As ISymbol
    Set pSym = pLC.Symbol
    Dim pSS As ISymbolSelector
    Dim bOK As Boolean
    Set pSS = New SymbolSelector
    pSS.AddSymbol pSym
    bOK = pSS.SelectSymbol(0)
    If bOK = True Then
        Set pLC.Symbol = pSS.GetSymbolAt(0)
    End If
    tocCtrl.Update
    mapCtrl.Refresh
  End If
End Sub

[阅读全文 | 回复(1) | 引用通告 | 编辑]

·Re:TOCControl中调出SymbolSelector     -|sancog(游客)发表评论于2008-5-1 23:01:00
sancog(游客)不错,谢谢
[个人主页 | 引用 | 返回 | 删除 | 回复]

发表评论:
页面载入中....
Powered by Oblog.