3 <title>KOL Help: TAction object (main frame)
</title>
7 <body bgcolor=
"#FFFFEF" text=
"#000000" link=
"#008080" vlink=
"#008000" alink=
"#808000">
8 <p><font face=
"Courier" color=
"#800080"><b>TAction( unit
<a href=kol_pas.htm
>KOL.pas
</a> )
9 <font face=
"Wingdings">ï
</font> <a href=tobj.htm
>TObj
</a>
10 <font face=
"Wingdings">ï
</font> <a href=_tobj.htm
>_TObj
</a>
13 TAction = object(
<a href=tobj.htm
target=
"_top">TObj
</a> )
15 Use action objects, in conjunction with action lists, to centralize the response
16 to user commands (actions).
17 Use AddControl, AddMenuItem, AddToolbarButton methods to link controls to an action.
18 See also
<a href=tactionlist.htm
target=
"_top">TActionList
</a>.
19 <h3 align=
"center"><font color=
"#FF8080">TAction properties
</font></h3>
20 <a name=
"caption"></a>
22 <font face=
"Courier" color=
"#800080"><b>property
</b> <font color=
"#808000"><b>Caption
</b></font>:
<b>string
</b>;
</font>
28 <font face=
"Courier" color=
"#800080"><b>property
</b> <font color=
"#808000"><b>Hint
</b></font>:
<b>string
</b>;
</font>
30 Hint (tooltip). Currently used for toolbar buttons only.
32 <a name=
"checked"></a>
34 <font face=
"Courier" color=
"#800080"><b>property
</b> <font color=
"#808000"><b>Checked
</b></font>:
<b>boolean
</b>;
</font>
38 <a name=
"enabled"></a>
40 <font face=
"Courier" color=
"#800080"><b>property
</b> <font color=
"#808000"><b>Enabled
</b></font>:
<b>boolean
</b>;
</font>
44 <a name=
"visible"></a>
46 <font face=
"Courier" color=
"#800080"><b>property
</b> <font color=
"#808000"><b>Visible
</b></font>:
<b>boolean
</b>;
</font>
50 <a name=
"helpcontext"></a>
52 <font face=
"Courier" color=
"#800080"><b>property
</b> <font color=
"#808000"><b>HelpContext
</b></font>:
<b>integer
</b>;
</font>
56 <a name=
"accelerator"></a>
58 <font face=
"Courier" color=
"#800080"><b>property
</b> <font color=
"#808000"><b>Accelerator
</b></font>:
<a href=kol_pas.htm#tmenuaccelerator
target=
"_top">TMenuAccelerator
</a>;
</font>
60 Accelerator for menu items.
62 <h4 align=
"center"><font color=
"black">Properties, inherited from
<a href=
"tobj.htm" target=
"_top">TObj
</a></font></h4>
63 <h3 align=
"center"><font color=
"#FF8080">TAction methods
</font></h3>
64 <a name=
"linkcontrol"></a>
66 <font face=
"Courier" color=
"#800080"><b>procedure
</b> <font color=
"#808000"><b>LinkControl
</b></font>( Ctrl:
<a href=kol_pas.htm#pcontrol
target=
"_top">PControl
</a> );
</font>
68 Add a link to a TControl or descendant control.
70 <a name=
"linkmenuitem"></a>
72 <font face=
"Courier" color=
"#800080"><b>procedure
</b> <font color=
"#808000"><b>LinkMenuItem
</b></font>( Menu: PMenu; MenuItemIdx:
<b>integer
</b> );
</font>
74 Add a link to a menu item.
76 <a name=
"linktoolbarbutton"></a>
78 <font face=
"Courier" color=
"#800080"><b>procedure
</b> <font color=
"#808000"><b>LinkToolbarButton
</b></font>( Toolbar:
<a href=kol_pas.htm#pcontrol
target=
"_top">PControl
</a>; ButtonIdx:
<b>integer
</b> );
</font>
80 Add a link to a toolbar button.
82 <a name=
"execute"></a>
84 <font face=
"Courier" color=
"#800080"><b>procedure
</b> <font color=
"#808000"><b>Execute
</b></font>;
</font>
86 Executes a
<a href=#onexecute
target=
"main">OnExecute
</a> event handler.
88 <h4 align=
"center"><font color=
"black">Methods, inherited from
<a href=
"tobj.htm" target=
"_top">TObj
</a></font></h4>
89 <h3 align=
"center"><font color=
"#FF8080">TAction events
</font></h3>
90 <a name=
"onexecute"></a>
92 <font face=
"Courier" color=
"#800080"><b>property
</b> <font color=
"#808000"><b>OnExecute
</b></font>:
<a href=kol_pas.htm#tonevent
target=
"_top">TOnEvent
</a>;
</font>
94 This event is executed when user clicks on a linked object or
<a href=#execute
target=
"main">Execute
</a> method was called.
96 <h4 align=
"center"><font color=
"black">Events, inherited from
<a href=
"tobj.htm" target=
"_top">TObj
</a></font></h4>
97 <h3 align=
"center"><font color=
"#FF8080">TAction fields
</font></h3>
98 <h4 align=
"center"><font color=
"black">Fields, inherited from
<a href=
"tobj.htm" target=
"_top">TObj
</a></font></h4>
100 <p align=
"center">[
<a href=index.htm
>Index
</a> ]
</p>
101 <p align=
"center"><font face=
"Comic Sans MS"><small>This help is generated
22-Sep-
2005 by KOL Help generator, (C)
2000-
2001 by Vladimir Kladov
<br>Modified (C)
2003 by Alexander Bartov
</small></font></p>