Solved

Using A TUpDown Component

Posted on 1999-01-11
2
222 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

939 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

6 Experts available now in Live!

Get 1:1 Help Now