Lazarus
Home
Help
TinyPortal
Search
Login
Register
Lazarus
»
Forum
»
Programming
»
General
»
(SOLVED) TToolButton question
Free Pascal
Website
Downloads
Wiki
Documentation
Bugtracker
Mailing List
Lazarus
Website
Downloads (Laz+FPC)
Packages (OPM)
FAQ
Wiki
Documentation (RTL/FCL/LCL)
Bugtracker
CCR Bugs
GIT
Mailing List
Other languages
Foundation
Website
Useful Wiki Links
Project Roadmap
Getting the Source
Screenshots
How to use the forum
Forum Rules
About donations (wiki)
Bookstore
Computer Math and Games in Pascal
(preview)
Lazarus Handbook
Search
Advanced search
Recent
TFPHTTPServer DDoS protec...
by
LemonParty
[
Today
at 12:54:23 pm]
var vs out
by
creaothceann
[
Today
at 12:46:08 pm]
Is it possible to communi...
by
LemonParty
[
Today
at 12:33:18 pm]
enable easy marker moveme...
by
Paolo
[
Today
at 12:10:00 pm]
Unleashed Pascal (async/a...
by
creaothceann
[
Today
at 12:09:09 pm]
Identify network devices
by
LemonParty
[
Today
at 11:53:27 am]
MOVED: soucis scrollbars ...
by
Martin_fr
[
Today
at 11:09:38 am]
soucis scrollbars V4.8 ?
by
Martin_fr
[
Today
at 11:08:13 am]
Star Wars Galaxian
by
PierceNg
[
Today
at 10:37:08 am]
[closed] Is case for stri...
by
egsuh
[
Today
at 10:27:17 am]
Automatic generation of *...
by
dbannon
[
Today
at 09:00:50 am]
Gtk3 becomes default widg...
by
dbannon
[
Today
at 08:44:10 am]
TurboBird for FireBird 5
by
laguna
[
Today
at 07:45:04 am]
Bugs caused by the weathe...
by
dsiders
[
Today
at 04:40:59 am]
[Solved[ How to define th...
by
jamie
[
Today
at 02:33:13 am]
Lazarus Bugfix Release 4....
by
moinsen
[
Today
at 12:57:37 am]
Lazarus IDE plugin that i...
by
BSaidus
[August 10, 2026, 11:21:20 pm]
Is it timing of a dataset...
by
1HuntnMan
[August 10, 2026, 09:41:05 pm]
Dataset EnableControls/Di...
by
1HuntnMan
[August 10, 2026, 09:31:58 pm]
Application triggers mess...
by
JanRoza
[August 10, 2026, 09:29:03 pm]
[SOLVED] TTL Record Count...
by
1HuntnMan
[August 10, 2026, 09:21:46 pm]
how to connect to mariadb...
by
eldonfsr
[August 10, 2026, 07:38:05 pm]
How get listy of FieldDat...
by
eldonfsr
[August 10, 2026, 06:19:37 pm]
PasGuard – Code Protectio...
by
pasguard
[August 10, 2026, 05:32:53 pm]
TyControls: a custom-draw...
by
Antek
[August 10, 2026, 05:20:29 pm]
« previous
next »
Print
Pages: [
1
]
Author
Topic: (SOLVED) TToolButton question (Read 2661 times)
xinyiman
Hero Member
Posts: 2261
(SOLVED) TToolButton question
«
on:
December 14, 2011, 03:17:44 pm »
Hello guys, I create a TToolBar at run time by creating some TToolButton and run-time check all the steps @ MyProcedure
How do I know in
procedure TForm1.MyProcedure(Sender: TObject);
TCoolButton which I hold?
«
Last Edit: December 14, 2011, 04:49:22 pm by xinyiman
»
Logged
Win10, Ubuntu and Mac
Lazarus: 2.1.0
FPC: 3.3.1
ludob
Hero Member
Posts: 1173
Re: TToolButton question
«
Reply #1 on:
December 14, 2011, 03:59:08 pm »
(Sender as TControl).name
Edit: a more structured way of doing this is to assign a value to TControl.Tag when creating the control and then check (Sender as TControl).Tag. This avoids testing strings.
«
Last Edit: December 14, 2011, 04:13:09 pm by ludob
»
Logged
xinyiman
Hero Member
Posts: 2261
Re: TToolButton question
«
Reply #2 on:
December 14, 2011, 04:49:10 pm »
Thank you. is perfect
Logged
Win10, Ubuntu and Mac
Lazarus: 2.1.0
FPC: 3.3.1
Print
Pages: [
1
]
« previous
next »
Lazarus
»
Forum
»
Programming
»
General
»
(SOLVED) TToolButton question
TinyPortal
© 2005-2018