?
Solved

Using A TUpDown Component

Posted on 1999-01-11
2
Medium Priority
?
272 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 1

Accepted Solution

by:
martin_g earned 280 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
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…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses
Course of the Month7 days, 21 hours left to enroll

765 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