📄 其他元件.tbl
字号:
Private Function SetInterval(AInterval)
OnDestroy( This )FInterval = AIntervalif not IsDesign() then FTimer=CreateTimer( this, "OnTimer", FInterval )end if
End Function
</programe>
</sheet>
<sheet name="三角按钮" bounds="0,0,21,21">
<shape name="矩形1" bounds="0,0,21,21" backcolor="$8000000F" pattern="1"/>
<line name="折线2" linecolor="$FFFFFF" backcolor="$8000000F" pattern="1">
<points>
1,19,6
1,1,2
18,1,2
</points>
</line>
<line name="折线3" linecolor="$808080">
<points>
1,19,6
19,1,2
</points>
</line>
<line name="折线5" linecolor="$808080" backcolor="$8000000F" pattern="1">
<points>
2,20,6
20,20,2
20,2,2
</points>
</line>
<line name="折线6" linecolor="$FFFFFF">
<points>
2,20,6
20,2,2
</points>
</line>
<line name="折线1">
<points>
1,20,6
21,0,2
</points>
</line>
<programe>
Published Function OnDown(Sender)
End Function
Private Function OnLButtonDown(Sender,X,Y)
d=UnitAtCursor(0)if d = 折线2 then d.LineColor = $808080 折线3.LineColor = $C0C0C0 OnUp( Sender )else if d = 折线5 then d.LineColor = $FFFFFF 折线6.LineColor = $808080 OnDown( Sender )end if
End Function
Private Function OnLButtonUp(Sender,X,Y)
折线2.LineColor = $FFFFFF折线3.LineColor = $808080折线5.LineColor = $808080折线6.LineColor = $FFFFFF
End Function
Private Function OnResize(Sender)
if Width < 6 then Width = 6end ifif Height < 6 then Height = 6end if矩形1.SetBounds( Left, Top, Width, Height )折线1.Points[0].x = Left折线1.Points[0].y = Top + Height - 1折线1.Points[1].x = Left + Width - 1折线1.Points[1].y = Top折线1.Refresh()折线2.Points[0].x = Left + 1折线2.Points[0].y = Top + Height - 3折线2.Points[1].x = Left + 1折线2.Points[1].y = Top + 1折线2.Points[2].x = Left + Width - 3折线2.Points[2].y = Top + 1折线2.Refresh()折线3.Points[0].x = Left + 1折线3.Points[0].y = Top + Height - 3折线3.Points[1].x = Left + Width - 3折线3.Points[1].y = Top + 1折线3.Refresh()折线5.Points[0].x = Left + 1折线5.Points[0].y = Top + Height - 1折线5.Points[1].x = Left + Width - 1折线5.Points[1].y = Top + Height - 1折线5.Points[2].x = Left + Width - 1折线5.Points[2].y = Top + 1折线5.Refresh()折线6.Points[0].x = Left + 2折线6.Points[0].y = Top + Height - 2折线6.Points[1].x = Left + Width - 2折线6.Points[1].y = Top + 2折线6.Refresh()Refresh()
End Function
Published Function OnUp(Sender)
End Function
</programe>
</sheet>
<sheet name="RadioGroup" bounds="10,7,98.25,23">
<elliment name="元件1" bounds="10,7,98.25,23" origin="-2,3" caption="'RadioButton1'" checked="False">
<text name="文字1" bounds="22.25,7,98.25,23" origin="7.25,5" autosize="true" border="$0" fontname="宋体" fontsize="12" multiline="false" textalign="24" text="RadioButton1"/>
<shape name="Arc1" type="Arc" bounds="10,8.45,21,19.45" origin="19,17.45" endangle="225" startangle="45" linecolor="$80000010"/>
<shape name="Arc2" type="Arc" bounds="10,8.45,21,19.45" origin="19,17.45" endangle="45" startangle="225" linecolor="$80000014"/>
<shape name="Circle1" type="Circle" bounds="10.5,8.95,20.5,18.95" origin="18.5,16.95" linecolor="$8000000F" pattern="1"/>
<shape name="Arc3" type="Arc" bounds="10.5,8.95,20.5,18.95" origin="19.5,17.95" endangle="224.13194855" startangle="45"/>
<shape name="园形2" type="Circle" bounds="13.5,11.95,17.5,15.95" origin="12,7.45" visible="false" backcolor="$0" pattern="1"/>
<programe>
Property Caption read GetCaption write SetCaption
Property Checked read GetChecked write SetChecked editor Bool
Private Function GetCaption()
return 文字1.Text
End Function
Private Function GetChecked()
return 园形2.Visible
End Function
Private Function SetCaption(ACaption)
文字1.Text = ACaptionRefresh()
End Function
Private Function SetChecked(AChecked)
园形2.Visible = AChecked
End Function
</programe>
</elliment>
<programe>
Property ButtonNum read GetButtonNum write SetButtonNum
Property Caption read GetCaption write SetCaption
Private Function GetButtonNum()
return FButtonNum
End Function
Private Function GetCaption()
return Units[FItemIndex].Caption
End Function
Private Function GetItemIndex()
return FItemIndex
End Function
Private Function Initialize(Sender)
FButtonNum=1FItemIndex=0
End Function
Property ItemIndex read GetItemIndex write SetItemIndex
Published Function OnItemChange(Sender)
'
End Function
Private Function OnKeyDown(Sender,Key)
if Key = 37 or Key = 38 then ItemIndex = ItemIndex - 1else if Key = 39 or Key = 40 then ItemIndex = ItemIndex + 1end if
End Function
Private Function OnLButtonDown(Sender,X,Y)
d=UnitAtCursor(0)if d <> 0 then Index = FindUnit( d ) if Index >= 0 then ItemIndex = Index end ifend if
End Function
Private Function SetButtonNum(AButtonNum)
if FButtonNum <> AButtonNum then FButtonNum = AButtonNum if FButtonNum > 20 then FButtonNum = 20 end if if FButtonNum < 1 then FButtonNum = 1 end if while UnitCount > FButtonNum DeleteUnit( Units[UnitCount-1] ) wend s=Units[UnitCount-1] i=UnitCount while i < FButtonNum d=Copy( s ) d.Top = s.Top + s.Height + 5 d.Checked = false s = d i = i + 1 wend ItemIndex = 0 Refresh()end if
End Function
Private Function SetCaption(ACaption)
Units[FItemIndex].Caption=ACaption
End Function
Private Function SetItemIndex(AItemIndex)
temp=FItemIndexUnits[FItemIndex].Checked = falseFItemIndex = AItemIndexif FItemIndex >= FButtonNum then FItemIndex = FButtonNum - 1end ifif FItemIndex < 0 then FItemIndex = 0end ifUnits[FItemIndex].Checked = trueif temp <> FItemIndex then OnItemChange( This )end if
End Function
</programe>
</sheet>
<sheet name="链接文本" cursor="7" bounds="0,0,220,20">
<text name="文字1" bounds="0,0,220,20" autosize="true" border="$0" fontname="宋体" fontsize="16" fontunderline="1" fontcolor="$FF0000" textalign="0" text="http://www.visual-graph.com"/>
<programe>
Private Function OnClick(Sender)
extern void = WinExec( string, int ) in Kernel32.dllWinExec( "explorer.exe " + 文字1.Text, 1 )
End Function
</programe>
</sheet>
<sheet name="数字编辑框" bounds="0,0,101,21">
<elliment name="三角按钮" bounds="80,0,101,21">
<line name="折线4" backcolor="$C0C0C0" pattern="1">
<points>
80,0,6
80,21,2
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -