Lazarus
Programming => LCL => Topic started by: DenPit5 on February 13, 2019, 05:26:00 pm
Title:
How to handle Buttons on TUpDown component ?
Post by:
DenPit5
on
February 13, 2019, 05:26:00 pm
Can anyone explain How to distinguish which of the two buttuns on the TUpDown control was pressed. ?
Title:
Re: How to handle Buttons on TUpDown component ?
Post by:
Handoko
on
February 13, 2019, 05:29:57 pm
Something like this below?
Code: Pascal
[Select]
[+]
[-]
procedure
TForm1
.
UpDown1Click
(
Sender
:
TObject
;
Button
:
TUDBtnType
)
;
begin
case
Button
of
btNext
:
ShowMessage
(
'Up is pressed'
)
;
btPrev
:
ShowMessage
(
'Down is pressed'
)
;
end
;
end
;
Title:
Re: How to handle Buttons on TUpDown component ?
Post by:
dsiders
on
February 13, 2019, 05:31:26 pm
Quote from: DenPit5 on February 13, 2019, 05:26:00 pm
Can anyone explain How to distinguish which of the two buttuns on the TUpDown control was pressed. ?
OnClick gets a TUDBtnType parameter: btPrev, btNext.
Title:
Re: How to handle Buttons on TUpDown component ?
Post by:
DenPit5
on
February 13, 2019, 09:17:24 pm
Many thanks HanDoko and dsiders for replies. That is just what I required. Thanks again.
TinyPortal
© 2005-2018