Lazarus
Home
Help
TinyPortal
Search
Login
Register
Lazarus
»
Forum
»
Programming
»
LCL
»
How to handle Buttons on TUpDown component ?
Free Pascal
Website
Downloads
Wiki
Bugtracker
Mailing List
Lazarus
Website
Downloads (Laz+FPC)
FAQ
Wiki
Bugtracker
Packages
IRC channel
Developer Blog
Follow us on Twitter
Latest SVN
Mailing List
Other languages
Foundation
Website
Useful Wiki Links
Project Roadmap
Getting the Source
Screenshots
About donations (wiki)
Bookstore
Computer Math and Games in Pascal
Search
Advanced search
Recent
how playing sound file in...
by
Deepaak
[
Today
at 05:05:32 am]
Documentation Questions
by
Handoko
[
Today
at 04:29:01 am]
Anyway to speed up worksh...
by
kjteng
[
Today
at 04:03:39 am]
Managing a dynamic array ...
by
Micayah Ritchie
[
Today
at 04:03:21 am]
Generics without speciali...
by
Akira1364
[
Today
at 03:14:37 am]
Fpcupdeluxe
by
ASBzone
[
Today
at 03:02:55 am]
Fpcupdeluxe v1.62m (and 1...
by
ASBzone
[
Today
at 03:01:14 am]
Using Tdbf for searching ...
by
chenyuchih
[
Today
at 02:50:50 am]
Lazarus Release 2.0.0
by
Cyrax
[
Today
at 02:11:36 am]
Fast way to load image pr...
by
lucamar
[
Today
at 01:06:15 am]
« previous
next »
Print
Pages: [
1
]
Author
Topic: How to handle Buttons on TUpDown component ? (Read 255 times)
DenPit5
New member
Posts: 16
How to handle Buttons on TUpDown component ?
«
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. ?
Logged
Handoko
Hero Member
Posts: 2859
My goal: build my own game engine using Lazarus
Re: How to handle Buttons on TUpDown component ?
«
Reply #1 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
;
Logged
dsiders
Full Member
Posts: 130
Re: How to handle Buttons on TUpDown component ?
«
Reply #2 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.
Logged
Lazarus 2.0 / FPC 3.0.4 / Windows 8.1 64-bit
DenPit5
New member
Posts: 16
Re: How to handle Buttons on TUpDown component ?
«
Reply #3 on:
February 13, 2019, 09:17:24 pm »
Many thanks HanDoko and dsiders for replies. That is just what I required. Thanks again.
Logged
Print
Pages: [
1
]
« previous
next »
Lazarus
»
Forum
»
Programming
»
LCL
»
How to handle Buttons on TUpDown component ?