Lazarus
Home
Help
TinyPortal
Search
Login
Register
Lazarus
»
Forum
»
Programming
»
General
»
[Solved] Add TAction programmatically
Free Pascal
Website
Downloads
Wiki
Bugtracker
Mailing List
Lazarus
Website
Downloads (Laz+FPC)
Packages (OPM)
FAQ
Wiki
Bugtracker
CCR Bugs
IRC channel
GIT
Mailing List
Other languages
Foundation
Website
Useful Wiki Links
Project Roadmap
Getting the Source
Screenshots
How to use the forum
About donations (wiki)
Bookstore
Computer Math and Games in Pascal
(preview)
Lazarus Handbook
Search
Advanced search
Recent
Some questions about Clas...
by
MarkMLl
[
Today
at 09:42:31 am]
Separating definition and...
by
MarkMLl
[
Today
at 09:39:25 am]
Carbon, a new programming...
by
440bx
[
Today
at 09:28:27 am]
Can FreePascal be used to...
by
Wysardry
[
Today
at 09:24:39 am]
How to dock project explo...
by
PascalDragon
[
Today
at 09:11:32 am]
Does Freepascal has every...
by
PascalDragon
[
Today
at 08:51:05 am]
saving graphs?
by
Weiss
[
Today
at 12:44:13 am]
TvPlanit - party: How to ...
by
wp
[August 10, 2022, 11:38:11 pm]
How to dock forms into a ...
by
LeoBruno
[August 10, 2022, 11:06:30 pm]
How to get message from S...
by
MarkMLl
[August 10, 2022, 10:00:28 pm]
« previous
next »
Print
Pages: [
1
]
Author
Topic: [Solved] Add TAction programmatically (Read 174 times)
Edson
Hero Member
Posts: 1240
[Solved] Add TAction programmatically
«
on:
July 05, 2022, 04:30:54 am »
Hi.
Is it possible to add a new TAction to an ActionList control programmatically? How?
I was searching about it with no success.
Thanks
«
Last Edit: July 05, 2022, 05:34:56 am by Edson
»
Logged
Lazarus 2.0.10 - FPC 3.2.0 - x86_64-win64 on Windows 8
Wallaby
New Member
Posts: 47
Re: Add TAction programmatically
«
Reply #1 on:
July 05, 2022, 04:51:47 am »
Pretty simple:
Code: Pascal
[Select]
[+]
[-]
Action
:
=
TAction
.
Create
(
YourActionList
)
;
Action
.
ActionList
:
=
YourActionList
;
Action
.
ShortCut
:
=
...
Action
.
Caption
:
=
...
Action
.
OnUpdate
:
=
...
Action
.
OnExecute
:
=
...
Logged
Edson
Hero Member
Posts: 1240
Re: Add TAction programmatically
«
Reply #2 on:
July 05, 2022, 05:34:38 am »
Thank you.
I was looking for a TACtionList.Add() method. But it wasn't the way.
Logged
Lazarus 2.0.10 - FPC 3.2.0 - x86_64-win64 on Windows 8
Print
Pages: [
1
]
« previous
next »
Lazarus
»
Forum
»
Programming
»
General
»
[Solved] Add TAction programmatically
TinyPortal
© 2005-2018