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

📄 treeview.tbl

📁 cShap控制云台运动
💻 TBL
📖 第 1 页 / 共 5 页
字号:
<?xml version="1.0" encoding="utf-8"?>
<vg version="700" gridsize="8" range="0,0,287,265" bordericons="7" borderstyle="1" scrollbars="0" windowstate="0" backcolor="$FFFFFF">
<page name="page" bounds="0,0,793.700787,1122.141732" visible="false" margin="100,100,100,100" paperwidth="2100" paperheight="2969"/>
<sheet name="sheet1" bounds="0,0,286,264" Selected="0">
<ListBox name="ListBox1" bounds="0,0,286,264" origin="112,10" Enable="true" Focused="false" itemheight="20" ItemIndex="-1">
<borderB name="Element1" bounds="0,0,286,264" origin="195,233">
<rect name="rect1" bounds="0,0,286,264" origin="64,24" linecolor="$8000000D" pattern="1"/>
</borderB>
<item name="Item1" bounds="2,2,284,22" origin="149.5,95.75" visible="false" Expand="true" HasChild="true" HasNext="true" Image="&apos;&apos;" Level="0" Selected="false" Value="&apos;&apos;">
<rect name="Rect2" bounds="2,2,284,22" origin="86.5,-33.5" linetype="0" backcolor="$80000005" pattern="1"/>
<rect name="Rect1" bounds="22,2,42,22" origin="26,10.084633" linetype="0" backcolor="$C0C0C0"/>
<text name="Text1" bounds="46,3,283,21" origin="169,13.584633" backcolor="$80000005" pattern="1" border="$0" fontname="瀹嬩綋" fontsize="12" fontcolor="$80000008" wordwrap="false" textalign="0"/>
<line name="line1" origin="19,12.084633" linetype="15">
<points>
12,12,6
22,12,2
</points>
</line>
<line name="line3" origin="12,7.084633" linetype="15">
<points>
12,2,6
12,12,2
</points>
</line>
<line name="line2" origin="12,17.084633" linetype="15">
<points>
12,12,6
12,22,2
</points>
</line>
<element name="Element1" bounds="6,6,18,18" origin="12,12.084633">
<rect name="Rect1" bounds="6,6,18,18" origin="12,12" pattern="1"/>
<line name="Line3" origin="8.293716,11.917587" linecolor="$80000010">
<points>
6.826,17.193,6
6.826,6.734,2
17.192661,6.734,2
</points>
</line>
<line name="Line1" origin="12,12">
<points>
9,12,6
15,12,2
</points>
</line>
<line name="Line2" origin="12,12" visible="false">
<points>
12,9,6
12,15,2
</points>
</line>
<programe>
published function OnClick(Sender)
OnIconClicked( this )
end function
private function OnLButtonDown(Sender,X,Y)
Rect1.BackColor=$80000005
end function
private function OnLButtonUp(Sender,X,Y)
Rect1.BackColor=$FFFFFF
end function
</programe>
</element>
<group name="Group1">
</group>
<programe>
property Expand read GetExpand write SetExpand editor bool
private function FirstLine(Sender)
Line3.Visible = 
end function
private function GetExpand()
return not Element1.UnitByName( &quot;Line2&quot; ).Visible
end function
private function GetHasChild()
return Element1.Visible
end function
private function GetHasNext()
return Line2.Visible
end function
property HasChild read GetHasChild write SetHasChild editor Bool
property HasNext read GetHasNext write SetHasNext editor Bool
property Image read FImage write SetImage
private function Initialize(Sender)
FValue=&apos;&apos;
FImage=&apos;&apos;
FLevel=0
FSelected=false
end function
property Level read FLevel write SetLevel
published function OnIconClicked(Sender)
n = Group1.FindUnit( Sender )
ToggleExpand( VScrollBar1.Pos + n )
end function
private function OnResize(Sender)
Rect2.SetBounds( Left, Top, Width, Height )
dist = 20
Element1.SetBounds( Left + 4 + dist * FLevel, Top + Height / 2 - Element1.Height / 2, Element1.Width, Element1.Height )
Line1.SetBounds( Element1.Left + Element1.Width / 2, Element1.Top + Element1.Height / 2, Line1.Width, 0 )
Line2.SetBounds( Element1.Left + Element1.Width / 2, Element1.Top + Element1.Height / 2, 0, Height / 2 )
Line3.SetBounds( Element1.Left + Element1.Width / 2, Element1.Top + Element1.Height / 2 - Line3.Height, 0, Height / 2 )
i = 0
x = Element1.Left + Element1.Width / 2 - dist
while i &lt; Group1.UnitCount
  d = Group1.Units[i]
  d.SetBounds( x, Top, 0, Height )
  x = x - dist
  i = i + 1
wend
if Element1.Right + 4 + Height &lt; Right then
  Rect1.SetBounds( Element1.Right+4,Top, Height, Height )
  Rect1.Visible = true
else
  Rect1.Visible = false
end if
if Right-Rect1.Right-5 &gt;= 0 then
  Text1.SetBounds( Rect1.Right + 4, Top + 1,Right - Rect1.Right - 5,Height - 2 )
  Text1.Visible = true
else
  Text1.Visible = false
end if
end function
property Selected read FSelected write SetSelected editor Bool
private function SetExpand(AValue)
Element1.UnitByName( &quot;Line2&quot; ).Visible = not AValue
end function
private function SetHasChild(AValue)
Element1.Visible = AValue
end function
private function SetHasNext(AValue)
Line2.Visible = AValue
end function
private function SetImage(AValue)
Rect1.Picture = ExtractFilePath( FileName ) + &apos;icon\&apos; + AValue + &apos;.bmp&apos;
FImage = AValue
end function
private function SetLevel(AValue)
while Group1.UnitCount &gt; AValue
  DeleteUnit( Group1.Units[Group1.UnitCount-1] )
wend
i = FLevel
FLevel = AValue
while i &lt; FLevel
  d = AddUnit( &quot;line&quot;, Left, Top, 0, Height )
  d.LineType = 15
  Group1.Add( d )
  i = i + 1
wend
OnResize( this )
end function
private function SetSelected(AValue)
FSelected = AValue
if FSelected then
  Text1.BackColor = $8000000D
	Text1.FontColor = $8000000E
else
	Text1.BackColor = $80000005
	Text1.FontColor = $80000008
end if
end function
private function SetValue(AValue)
Text1.Text = AValue
FValue = AValue
end function
public function ShowLast(B)
Line3.Visible = B
end function
public function ShowLevelLine(m,v)
Group1.Units[m].Visible = v
end function
property Value read FValue write SetValue
</programe>
</item>
<item name="Item2" bounds="2,2,284,22" origin="149.5,95.75" visible="false" Expand="true" HasChild="true" HasNext="true" Image="&apos;&apos;" Level="0" Selected="false" Value="&apos;&apos;">
<rect name="Rect2" bounds="2,2,284,22" origin="86.5,-33.5" linetype="0" backcolor="$80000005" pattern="1"/>
<rect name="Rect1" bounds="22,2,42,22" origin="26,10.084633" linetype="0" backcolor="$C0C0C0"/>
<text name="Text1" bounds="46,3,283,21" origin="169,13.584633" backcolor="$80000005" pattern="1" border="$0" fontname="瀹嬩綋" fontsize="12" fontcolor="$80000008" wordwrap="false" textalign="0"/>
<line name="line1" origin="19,12.084633" linetype="15">
<points>
12,12,6
22,12,2
</points>
</line>
<line name="line3" origin="12,7.084633" linetype="15">
<points>
12,2,6
12,12,2
</points>
</line>
<line name="line2" origin="12,17.084633" linetype="15">
<points>
12,12,6
12,22,2
</points>
</line>
<element name="Element1" bounds="6,6,18,18" origin="12,12.084633">
<rect name="Rect1" bounds="6,6,18,18" origin="12,12" pattern="1"/>
<line name="Line3" origin="8.293716,11.917587" linecolor="$80000010">
<points>
6.826,17.193,6
6.826,6.734,2
17.192661,6.734,2
</points>
</line>
<line name="Line1" origin="12,12">
<points>
9,12,6
15,12,2
</points>
</line>
<line name="Line2" origin="12,12" visible="false">
<points>
12,9,6
12,15,2
</points>
</line>
<programe>
published function OnClick(Sender)
OnIconClicked( this )
end function
private function OnLButtonDown(Sender,X,Y)
Rect1.BackColor=$80000005
end function
private function OnLButtonUp(Sender,X,Y)
Rect1.BackColor=$FFFFFF
end function
</programe>
</element>
<group name="Group1">
</group>
<programe>
property Expand read GetExpand write SetExpand editor bool
private function FirstLine(Sender)
Line3.Visible = 
end function
private function GetExpand()
return not Element1.UnitByName( &quot;Line2&quot; ).Visible
end function
private function GetHasChild()
return Element1.Visible
end function
private function GetHasNext()
return Line2.Visible
end function
property HasChild read GetHasChild write SetHasChild editor Bool
property HasNext read GetHasNext write SetHasNext editor Bool
property Image read FImage write SetImage
private function Initialize(Sender)
FValue=&apos;&apos;
FImage=&apos;&apos;
FLevel=0
FSelected=false
end function
property Level read FLevel write SetLevel
published function OnIconClicked(Sender)
n = Group1.FindUnit( Sender )
ToggleExpand( VScrollBar1.Pos + n )
end function
private function OnResize(Sender)
Rect2.SetBounds( Left, Top, Width, Height )
dist = 20
Element1.SetBounds( Left + 4 + dist * FLevel, Top + Height / 2 - Element1.Height / 2, Element1.Width, Element1.Height )
Line1.SetBounds( Element1.Left + Element1.Width / 2, Element1.Top + Element1.Height / 2, Line1.Width, 0 )
Line2.SetBounds( Element1.Left + Element1.Width / 2, Element1.Top + Element1.Height / 2, 0, Height / 2 )
Line3.SetBounds( Element1.Left + Element1.Width / 2, Element1.Top + Element1.Height / 2 - Line3.Height, 0, Height / 2 )
i = 0
x = Element1.Left + Element1.Width / 2 - dist
while i &lt; Group1.UnitCount
  d = Group1.Units[i]
  d.SetBounds( x, Top, 0, Height )
  x = x - dist
  i = i + 1
wend
if Element1.Right + 4 + Height &lt; Right then
  Rect1.SetBounds( Element1.Right+4,Top, Height, Height )
  Rect1.Visible = true
else
  Rect1.Visible = false
end if
if Right-Rect1.Right-5 &gt;= 0 then
  Text1.SetBounds( Rect1.Right + 4, Top + 1,Right - Rect1.Right - 5,Height - 2 )
  Text1.Visible = true
else
  Text1.Visible = false
end if
end function
property Selected read FSelected write SetSelected editor Bool
private function SetExpand(AValue)
Element1.UnitByName( &quot;Line2&quot; ).Visible = not AValue
end function
private function SetHasChild(AValue)
Element1.Visible = AValue
end function
private function SetHasNext(AValue)
Line2.Visible = AValue
end function
private function SetImage(AValue)
Rect1.Picture = ExtractFilePath( FileName ) + &apos;icon\&apos; + AValue + &apos;.bmp&apos;
FImage = AValue
end function
private function SetLevel(AValue)
while Group1.UnitCount &gt; AValue
  DeleteUnit( Group1.Units[Group1.UnitCount-1] )
wend
i = FLevel
FLevel = AValue
while i &lt; FLevel
  d = AddUnit( &quot;line&quot;, Left, Top, 0, Height )
  d.LineType = 15
  Group1.Add( d )
  i = i + 1
wend
OnResize( this )
end function
private function SetSelected(AValue)
FSelected = AValue
if FSelected then
  Text1.BackColor = $8000000D
	Text1.FontColor = $8000000E
else
	Text1.BackColor = $80000005
	Text1.FontColor = $80000008
end if
end function
private function SetValue(AValue)
Text1.Text = AValue
FValue = AValue
end function
public function ShowLast(B)
Line3.Visible = B
end function
public function ShowLevelLine(m,v)
Group1.Units[m].Visible = v
end function
property Value read FValue write SetValue
</programe>
</item>
<item name="Item3" bounds="2,22,284,42" origin="149.5,95.75" visible="false" Expand="true" HasChild="true" HasNext="true" Image="&apos;&apos;" Level="0" Selected="false" Value="&apos;&apos;">
<rect name="Rect2" bounds="2,22,284,42" origin="86.5,-13.5" linetype="0" backcolor="$80000005" pattern="1"/>
<rect name="Rect1" bounds="22,22,42,42" origin="26,30.084633" linetype="0" backcolor="$C0C0C0"/>
<text name="Text1" bounds="46,23,283,41" origin="169,33.584633" backcolor="$80000005" pattern="1" border="$0" fontname="瀹嬩綋" fontsize="12" fontcolor="$80000008" wordwrap="false" textalign="0"/>
<line name="line1" origin="19,32.084633" linetype="15">
<points>
12,32,6
22,32,2
</points>
</line>
<line name="line3" origin="12,27.084633" linetype="15">
<points>
12,22,6
12,32,2
</points>
</line>
<line name="line2" origin="12,37.084633" linetype="15">
<points>
12,32,6
12,42,2
</points>
</line>
<element name="Element1" bounds="6,26,18,38" origin="12,32.084633">
<rect name="Rect1" bounds="6,26,18,38" origin="12,32" pattern="1"/>
<line name="Line3" origin="8.293716,31.917587" linecolor="$80000010">
<points>
6.826,37.193,6
6.826,26.734,2
17.192661,26.734,2
</points>
</line>
<line name="Line1" origin="12,32">
<points>
9,32,6
15,32,2
</points>
</line>
<line name="Line2" origin="12,32" visible="false">
<points>
12,29,6
12,35,2
</points>
</line>
<programe>
published function OnClick(Sender)
OnIconClicked( this )
end function
private function OnLButtonDown(Sender,X,Y)
Rect1.BackColor=$80000005
end function
private function OnLButtonUp(Sender,X,Y)
Rect1.BackColor=$FFFFFF
end function
</programe>
</element>
<group name="Group1">
</group>
<programe>
property Expand read GetExpand write SetExpand editor bool
private function FirstLine(Sender)
Line3.Visible = 
end function
private function GetExpand()
return not Element1.UnitByName( &quot;Line2&quot; ).Visible
end function
private function GetHasChild()
return Element1.Visible
end function
private function GetHasNext()
return Line2.Visible
end function
property HasChild read GetHasChild write SetHasChild editor Bool
property HasNext read GetHasNext write SetHasNext editor Bool
property Image read FImage write SetImage
private function Initialize(Sender)
FValue=&apos;&apos;
FImage=&apos;&apos;
FLevel=0
FSelected=false
end function
property Level read FLevel write SetLevel
published function OnIconClicked(Sender)
n = Group1.FindUnit( Sender )
ToggleExpand( VScrollBar1.Pos + n )
end function
private function OnResize(Sender)
Rect2.SetBounds( Left, Top, Width, Height )
dist = 20
Element1.SetBounds( Left + 4 + dist * FLevel, Top + Height / 2 - Element1.Height / 2, Element1.Width, Element1.Height )
Line1.SetBounds( Element1.Left + Element1.Width / 2, Element1.Top + Element1.Height / 2, Line1.Width, 0 )
Line2.SetBounds( Element1.Left + Element1.Width / 2, Element1.Top + Element1.Height / 2, 0, Height / 2 )
Line3.SetBounds( Element1.Left + Element1.Width / 2, Element1.Top + Element1.Height / 2 - Line3.Height, 0, Height / 2 )
i = 0

⌨️ 快捷键说明

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