Solved

Using A TUpDown Component

Posted on 1999-01-11
2
218 Views
Last Modified: 2010-04-06
I dropped a TUpDown named UpDown1 component onto a form and associated it to a TPanel named Panel1.  I thought that once I associated UpDown1 to Panel1 that when the user clicks on the up or down arrows the value displayed in Panel1.Caption would automatically be updated to the correct value.  I realize that UpDown1.Property contains the current value, but I thought the association would update Panel1.Caption.  The end result is that it doesn't.  What do I need to do to get the Panel1.Caption to show the correct value.  I have inserted no code into any of UpDown1's methods.  When the user clicks on the arrows nothing happens.
0
Comment
Question by:tecmaster
2 Comments
 
LVL 1

Accepted Solution

by:
martin_g earned 70 total points
ID: 1355965
Don't associate it with UPDown (there may be a bug in the VCL).  It will work if you don't.  Try this code:

procedure TForm1.UpDown1Click(Sender: TObject; Button: TUDBtnType);
begin
Panel1.caption :=Inttostr(UpDown1.position);

end;
0
 

Author Comment

by:tecmaster
ID: 1355966
Thanks for the answer.  I original used a TLabel to show the count, but since you cannot associate it with the TUpDown I decided use the TPanel instead.  Guess I should of just left the the things the way they were.

Tecmaster
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now