📄 poplist.tbl
字号:
private function OnResize(Sender)
Rect2.SetBounds( Left, Top, Width, Height )
Rect1.SetBounds( Left+4,Top+1,16,16 )
if Left+Width-Rect1.Left-Rect1.Width-4 >= 0 then
Text1.SetBounds( Rect1.Left+Rect1.Width+4,Top,Left+Width-Rect1.Left-Rect1.Width-4,Text1.Height)
Text1.Visible = true
else
Text1.Visible = false
end if
end function
property Selected read FSelected write SetSelected editor Bool
private function SetSelected(AValue)
if AValue then
Text1.BackColor = $8000000D
if Text1.FontColor <> $80000011 then
Text1.FontColor = $8000000E
end if
else
Text1.BackColor = $80000005
if Text1.FontColor <> $80000011 then
Text1.FontColor = $80000008
end if
end if
end function
private function SetValue(AValue)
Text1.Text = AValue
FValue = AValue
end function
property Value read FValue write SetValue
</programe>
</element>
<element name="Item11" bounds="1,191,368,210" origin="148.5,94.75" visible="false" Selected="false" Value="''">
<rect name="Rect2" bounds="1,191,368,210" origin="85.5,155.5" linetype="0" backcolor="$80000005" pattern="1"/>
<rect name="Rect1" bounds="5,192,21,208" origin="9,199" linetype="0" pattern="1"/>
<text name="Text1" bounds="25,191,368,209" origin="144,209" backcolor="$80000005" pattern="1" border="$0" fontname="瀹嬩綋" fontsize="12" fontcolor="$80000008" wordwrap="false" textalign="0"/>
<programe>
private function Initialize(Sender)
FValue=''
FSelected = false
end function
private function OnResize(Sender)
Rect2.SetBounds( Left, Top, Width, Height )
Rect1.SetBounds( Left+4,Top+1,16,16 )
if Left+Width-Rect1.Left-Rect1.Width-4 >= 0 then
Text1.SetBounds( Rect1.Left+Rect1.Width+4,Top,Left+Width-Rect1.Left-Rect1.Width-4,Text1.Height)
Text1.Visible = true
else
Text1.Visible = false
end if
end function
property Selected read FSelected write SetSelected editor Bool
private function SetSelected(AValue)
if AValue then
Text1.BackColor = $8000000D
if Text1.FontColor <> $80000011 then
Text1.FontColor = $8000000E
end if
else
Text1.BackColor = $80000005
if Text1.FontColor <> $80000011 then
Text1.FontColor = $80000008
end if
end if
end function
private function SetValue(AValue)
Text1.Text = AValue
FValue = AValue
end function
property Value read FValue write SetValue
</programe>
</element>
<VScrollBar name="VScrollBar1" bounds="351,1,368,209" origin="247.5,73" visible="false" protect="4" Enable="true" Max="0" Page="1" Pos="0">
<rect name="Line1" bounds="351,17,368,193" origin="399,29" 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
FTimer=CreateTimer( this, "OnTimer", FTimerInterval )
end function
published function OnLButtonUp(Sender,X,Y)
Line2.Visible = false
OnDestroy( Sender )
end function
</programe>
</rect>
<rect name="Line2" bounds="351,17,368,17" origin="399,35" visible="false" linetype="0" backcolor="$80000010" pattern="1">
<programe>
published function OnLButtonDown(Sender,X,Y)
FTimer=CreateTimer(this,"OnTimer",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)
if FTimer <> 0 then
DestroyTimer(FTimer)
FTimer = 0
end if
end function
</programe>
</rect>
<element name="Element3" bounds="351,17,367,33" origin="359,28" protect="32">
<line name="Line5" origin="359,25" linecolor="$80000016">
<points>
351,33,6
351,17,2
367,17,2
</points>
</line>
<line name="Line6" origin="359,25" linecolor="$80000015">
<points>
351,33,6
367,33,2
367,17,2
</points>
</line>
<line name="Line7" origin="360,26" linecolor="$80000014">
<points>
352,32.111111,6
352,17.888889,2
366,17.888889,2
</points>
</line>
<line name="Line8" origin="360,26" linecolor="$80000010">
<points>
352,32.111111,6
366,32.111111,2
366,17.888889,2
</points>
</line>
<rect name="Rect2" bounds="353,18.777778,365,31.222222" origin="359,26" 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" bounds="351,193,367,209" origin="359,132" protect="32" Enable="true">
<line name="Line5" origin="359,201.5" linecolor="$80000016">
<points>
351,209,6
351,193,2
367,193,2
</points>
</line>
<line name="Line6" origin="359,201.5" linecolor="$80000015">
<points>
351,209,6
367,209,2
367,193,2
</points>
</line>
<line name="Line7" origin="360,202.5" linecolor="$80000014">
<points>
352,208.111111,6
352,193.888889,2
366,193.888889,2
</points>
</line>
<line name="Line8" origin="360,202.5" linecolor="$80000010">
<points>
352,208.111111,6
366,208.111111,2
366,193.888889,2
</points>
</line>
<rect name="Rect2" bounds="353,194.777778,365,207.222222" origin="359,202.5" linecolor="$8000000F" backcolor="$8000000F" pattern="1"/>
<line name="Line9" origin="359,204.5" linecolor="$80000012" backcolor="$80000012" pattern="1">
<points>
359,202.777778,6
362,200.111111,2
356,200.111111,3
</points>
</line>
<programe>
property Enable read GetEnable write SetEnable editor Bool
private function GetEnable()
return Enabled
end function
private function Initialize(Sender)
FTimer=0
FTimerInterval = 300
end function
published function OnClick(Sender)
SetPos( FPos + 1 )
end function
private function OnDestroy(Sender)
if FTimer <> 0 then
DestroyTimer( FTimer )
FTimer = 0
end if
end function
private function OnLButtonDown(Sender,X,Y)
Line7.LineColor = $80000010
Line8.LineColor = $80000014
FTimerInterval = 300
FTimer=CreateTimer( Sender, "OnTimer", FTimerInterval )
end function
private function OnLButtonUp(Sender,X,Y)
Line7.LineColor = $80000014
Line8.LineColor = $80000010
OnDestroy( Sender )
end function
private function OnTimer(Sender)
OnClick( Sender )
if FTimerInterval = 300 then
OnDestroy( Sender )
FTimerInterval = 100
FTimer=CreateTimer( Sender, "OnTimer", 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" bounds="351,1,367,17" origin="359,18" protect="32" Enable="true">
<line name="Line5" origin="359,9.5" linecolor="$80000016">
<points>
351,17,6
351,1,2
367,1,2
</points>
</line>
<line name="Line6" origin="359,9.5" linecolor="$80000015">
<points>
351,17,6
367,17,2
367,1,2
</points>
</line>
<line name="Line7" origin="360,10.5" linecolor="$80000014">
<points>
352,16.111111,6
352,1.888889,2
366,1.888889,2
</points>
</line>
<line name="Line8" origin="360,10.5" linecolor="$80000010">
<points>
352,16.111111,6
366,16.111111,2
366,1.888889,2
</points>
</line>
<rect name="Rect2" bounds="353,2.777778,365,15.222222" origin="359,10.5" linecolor="$8000000F" backcolor="$8000000F" pattern="1"/>
<line name="Line9" origin="359,9.5" linecolor="$80000012" backcolor="$80000012" pattern="1">
<points>
359,8.111111,6
362,10.777778,2
356,10.777778,3
</points>
</line>
<programe>
property Enable read GetEnable write SetEnable editor Bool
private function GetEnable()
return Enabled
end function
private function Initialize(Sender)
FTimer=0
FTimerInterval = 300
end function
published function OnClick(Sender)
SetPos( FPos - 1 )
end function
private function OnDestroy(Sender)
if FTimer <> 0 then
DestroyTimer( FTimer )
FTimer = 0
end if
end function
private function OnLButtonDown(Sender,X,Y)
Line7.LineColor = $80000010
Line8.LineColor = $80000014
FTimerInterval = 300
FTimer=CreateTimer( Sender, "OnTimer", FTimerInterval )
end function
private function OnLButtonUp(Sender,X,Y)
Line7.LineColor = $80000014
Line8.LineColor = $80000010
OnDestroy( Sender )
end function
private function OnTimer(Sender)
OnClick( Sender )
if FTimerInterval = 300 then
OnDestroy( Sender )
FTimerInterval = 100
FTimer=CreateTimer( Sender, "OnTimer", 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
FTimer=0
FTimerInterval = 300
end function
property Max read FMax write SetMax
published function OnChange(Sender)
if IsLoaded() then
i=0
j=VScrollBar1.Pos
while i < Group1.UnitCount
AUnit = Group1.Units[i]
if i + j < ar.Count then
AUnit.Visible = true
AUnit.Units[1].BackColor = $FFFFFF
AUnit.Units[1].Pattern = 1
OnDrawItem( i + j )
else
AUnit.Visible = false
end if
AUnit.Selected = ( i + j = FItemIndex )
i = i + 1
wend
end if
end function
private function OnDestroy(Sender)
if FTimer <> 0 then
DestroyTimer( FTimer )
FTimer = 0
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
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -