propedit.tbl

来自「一个不错的做图软件」· TBL 代码 · 共 578 行 · 第 1/2 页

TBL
578
字号
<?xml version="1.0" encoding="utf-8"?>
<vg version="723" range="0,0,2000,2000" borderstyle="0" scrollbars="0" paperbounds="0,0,793.700787,1122.141732" papervisible="false">
<sheet name="Sheet1" bounds="0,-7,748,725">
<listbox name="ListBox1" origin="85,62" bounds="0,0,248,38" combo="0" itemheight="18" ItemIndex="-1" ShowPropertyName="false">
<rect name="Rect1" origin="180,148" bounds="0,0,231,38" HasLabel="false" Text1="0" linetype="0" linewidth="0" backcolor="$80000005"/>
<VScrollBar name="VScrollBar1" origin="238.5,72" bounds="231,0,248,38" Enable="true" Max="0" Page="1" Pos="0">
<rect name="Line1" origin="279,28" bounds="231,0,248,22" HasLabel="false" Text1="0" linetype="0" backcolor="$80000000" frontcolor="$80000014" pattern="8">
<programe>
<!--
published function OnLButtonDown(Sender,X,Y)
if Y > Element3.Top then
  Line2.SetBounds( Line1.Left, Element3.Top + Element3.Height, Line1.Width, Element1.Top - Element3.Top - Element3.Height )
  Line1.Tag = 1
else
  Line2.SetBounds( Line1.Left, Line1.Top, Line1.Width, Element3.Top - Line1.Top )
  Line1.Tag = -1
end if
Line2.Visible = true
SetPos( FPos + Line1.Tag * FPage )
FTimerInterval = 300
SetTimer( FTimerInterval )
end function
published function OnLButtonUp(Sender,X,Y)
Line2.Visible = false
SetTimer( 0 )
end function
-->
</programe>
</rect>
<rect name="Line2" origin="279,34" bounds="231,0,248,0" visible="false" HasLabel="false" Text1="0" linetype="0" backcolor="$80000010" pattern="1">
<programe>
<!--
published function OnLButtonDown(Sender,X,Y)
SetTimer( 100 )
if Y > Element3.Top then
	Sender.Id = FPage
else
	Sender.Id = -FPage
end if
Sender.Tag=Y
end function
published function OnLButtonUp(Sender,X,Y)
SetTimer( 0 )
end function
-->
</programe>
</rect>
<element name="Element3" origin="239,27" bounds="231,0,247,16" protect="32">
<line name="Line5" origin="239,8" linecolor="$80000016" points="231,16,6 231,0,2 247,0,2"/>
<line name="Line6" origin="239,8" linecolor="$80000015" points="231,16,6 247,16,2 247,0,2"/>
<line name="Line7" origin="240,9" linecolor="$80000014" points="232,15.111111,6 232,0.888889,2 246,0.888889,2"/>
<line name="Line8" origin="240,9" linecolor="$80000010" points="232,15.111111,6 246,15.111111,2 246,0.888889,2"/>
<rect name="Rect2" origin="239,9" bounds="233,1.777778,245,14.222222" HasLabel="false" Text1="0" linecolor="$8000000F" backcolor="$8000000F" pattern="1"/>
<programe>
<!--
published function OnLButtonDown(Sender,X,Y)
Sender.Tag=Y-Sender.Top
end function
published function OnLButtonUp(Sender,X,Y)
Sender.Tag=0
end function
published function OnMouseMove(Sender,X,Y)
if Sender.Tag > 0 then
  SetPos( ( Y - Sender.Tag - Line1.Top ) / ( Line1.Height - Sender.Height ) * FMax )
end if
end function
-->
</programe>
</element>
<element name="Element1" origin="239,131" bounds="231,22,247,38" protect="32" Enable="true">
<line name="Line5" origin="239,30.5" linecolor="$80000016" points="231,38,6 231,22,2 247,22,2"/>
<line name="Line6" origin="239,30.5" linecolor="$80000015" points="231,38,6 247,38,2 247,22,2"/>
<line name="Line7" origin="240,31.5" linecolor="$80000014" points="232,37.111111,6 232,22.888889,2 246,22.888889,2"/>
<line name="Line8" origin="240,31.5" linecolor="$80000010" points="232,37.111111,6 246,37.111111,2 246,22.888889,2"/>
<rect name="Rect2" origin="239,31.5" bounds="233,23.777778,245,36.222222" HasLabel="false" Text1="0" linecolor="$8000000F" backcolor="$8000000F" pattern="1"/>
<line name="Line9" origin="239,33.5" linecolor="$80000012" backcolor="$80000012" pattern="1" points="239,32,6 242,29,2 236,29,3"/>
<programe>
<!--
property Enable read GetEnable write SetEnable editor Bool
private function GetEnable()
return Enabled
end function
private function Initialize(Sender)
FTimerInterval = 300
end function
published function OnClick(Sender)
SetPos( FPos + 1 )
end function
private function OnLButtonDown(Sender,X,Y)
Line7.LineColor = $80000010
Line8.LineColor = $80000014
FTimerInterval = 300
SetTimer( FTimerInterval )
end function
private function OnLButtonUp(Sender,X,Y)
Line7.LineColor = $80000014
Line8.LineColor = $80000010
SetTimer( 0 )
end function
private function OnTimer(Sender)
OnClick( Sender )
if FTimerInterval = 300 then
	FTimerInterval = 100
	SetTimer( FTimerInterval )
end if
end function
private function SetEnable(AValue)
if AValue then
  Line9.BackColor = $80000012
  Line9.LineColor = $80000012
else
  Line9.BackColor = $80000011
  Line9.LineColor = $80000011
end if
Enabled = AValue
end function
-->
</programe>
</element>
<element name="Element2" origin="239,17" bounds="231,0,247,16" protect="32" Enable="true">
<line name="Line5" origin="239,8.5" linecolor="$80000016" points="231,16,6 231,0,2 247,0,2"/>
<line name="Line6" origin="239,8.5" linecolor="$80000015" points="231,16,6 247,16,2 247,0,2"/>
<line name="Line7" origin="240,9.5" linecolor="$80000014" points="232,15.111111,6 232,0.888889,2 246,0.888889,2"/>
<line name="Line8" origin="240,9.5" linecolor="$80000010" points="232,15.111111,6 246,15.111111,2 246,0.888889,2"/>
<rect name="Rect2" origin="239,9.5" bounds="233,1.777778,245,14.222222" HasLabel="false" Text1="0" linecolor="$8000000F" backcolor="$8000000F" pattern="1"/>
<line name="Line9" origin="239,8.5" linecolor="$80000012" backcolor="$80000012" pattern="1" points="239,7,6 242,10,2 236,10,3"/>
<programe>
<!--
property Enable read GetEnable write SetEnable editor Bool
private function GetEnable()
return Enabled
end function
private function Initialize(Sender)
FTimerInterval = 300
end function
published function OnClick(Sender)
SetPos( FPos - 1 )
end function
private function OnLButtonDown(Sender,X,Y)
Line7.LineColor = $80000010
Line8.LineColor = $80000014
FTimerInterval = 300
SetTimer( FTimerInterval )
end function
private function OnLButtonUp(Sender,X,Y)
Line7.LineColor = $80000014
Line8.LineColor = $80000010
SetTimer( 0 )
end function
private function OnTimer(Sender)
OnClick( Sender )
if FTimerInterval = 300 then
	FTimerInterval = 100
	SetTimer( FTimerInterval )
end if
end function
private function SetEnable(AValue)
if AValue then
  Line9.BackColor = $80000012
  Line9.LineColor = $80000012
else
  Line9.BackColor = $80000011
  Line9.LineColor = $80000011
end if
Enabled = AValue
end function
-->
</programe>
</element>
<programe>
<!--
property Enable read GetEnable write SetEnable editor Bool
private function GetEnable()
return Enabled
end function
private function Initialize(Sender)
FPos=0
FPage=10
FMax=100
FTimerInterval = 300
end function
property Max read FMax write SetMax
published function OnChange(Sender)
if IsLoaded() then
  i=0
  while i < ar.Count
    e = Parent.UnitByName( 'G' + ar[i] )
    if e = 0 then
      e = Parent.UnitByName( 'V' + ar[i] )
    end if
    if e <> 0 then
      e.Visible = false
    end if
    i = i + 1
  wend
  i = 0
  j=VScrollBar1.Pos
  while i < UnitCount - 2
    d = Units[i+2]
    if i + j < ar.Count then
      d.Visible = true
      if FShowPropertyName then
        d.Text = ar[i+j]
      else
        d.Text = cp[i+j]
      end if
      e = Parent.UnitByName( 'G' + ar[i+j] )
      if e = 0 then
        e = Parent.UnitByName( 'V' + ar[i+j] )
        d.FontColor = $80000008
      else
        d.FontColor = $FF
      end if
      if e <> 0 then
        e.SetBounds( Parent.Line3.Left + 1, d.Top + 1, Rect1.Left + Rect1.Width - Parent.Line3.Left - 2, d.Height - 2 )
        e.Visible = true
      end if
    else
      d.Visible = false
      d.Text = ""
    end if
    i = i + 1
  wend
  n = FItemIndex
  FItemIndex = -2
  bak = Inspector
  Inspector = 0
  ItemIndex = n
  Inspector = bak
  UpdateWindow()
end if
end function
private function OnResize(Sender)
if Height <= 32 then
  h = ( Height - 1 ) / 2
  Element1.SetBounds( Left, Top+Height-h, Element1.Width, h )
  Element2.SetBounds( Left, Top, Element2.Width, h )
else
  Element1.SetBounds( Left, Top + Height - 16, Element1.Width, 16 )
  Element2.SetBounds( Left, Top, Element2.Width, 16 )
end if
Element3.Visible = Height >= 48
if Element3.Visible then
  Element3.Top = Element2.Top + Element2.Height
else
  Element3.Top = Element2.Top
end if
Line1.SetBounds( Left, Element3.Top, Line1.Width, Element1.Top - Element3.Top )
Line2.SetBounds( Line1.Left, Line1.Top, Line1.Width, Line1.Height )
SetPos( FPos )
end function
private function OnTimer(Sender)
SetPos( FPos + Line1.Tag * FPage )
p = Point( 0, 0 )
GetCursorPos( p )
ScreenToClient( p )
ClientToView( p )
stop = false
if Line1.Tag > 0 then
  if p.y < Element3.Top + Element3.Height then
    stop = true
  end if
else
  if p.y > Element3.Top then
    stop = true
  end if
end if
if stop then
  SetTimer( 0 )
  Line2.Visible = false
else if FTimerInterval = 300 then
  FTimerInterval = 100
  SetTimer( FTimerInterval )
end if
end function
property Page read FPage write SetPage
property Pos read FPos write SetPos
private function SetEnable(AValue)
Element1.Enable = AValue
Element2.Enable = AValue
Enabled = AValue
end function
private function SetMax(AValue)
n = int( AValue )
if ( n < 0 ) then
  n = 0
end if
FMax = n
SetPage( FPage )

⌨️ 快捷键说明

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