图元管理系统反向选择问题selected无效(100)

  • 主题发起人 星星的心情
  • 开始时间

星星的心情

Unregistered / Unconfirmed
GUEST, unregistred user!
该代码是实现反向选择功能,但u.isselected无效,所以无法进行反选,请高手解决.procedure SelectOther(AVg:Tvgctrl); function UnitIsInGroup(AUnit:IUnit;AGroup:IGroup):Boolean; var j:Integer; begin Result := False; for j := 0 to AGroup.UnitCount - 1 do begin if AGroup.Units[j] = AUnit then begin Result := True; Break; end; end; end;var i : Integer; Sheet : ISheet; U: IUnit;begin Sheet := AVg.vg.ActiveSheet; for i:= Sheet.UnitCount-1 downto 0 do begin U := Sheet.Units; if U.Locked then Continue; if U.isSelected then Sheet.Selection.Remove(U) else Sheet.Selection.Add(U); end;end;
 
[?] 你这个用的啥控件啊
 
我们有矢量图形组件TCADhttp://www.codeidea.com/cn/
 

Similar threads

I
回复
0
查看
570
import
I
S
回复
0
查看
3K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
2K
SUNSTONE的Delphi笔记
S
I
回复
0
查看
868
import
I
I
回复
0
查看
523
import
I
顶部