Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Increment ProgressBar.Position by 0.42

Posted on 2006-05-31
2
Medium Priority
?
190 Views
Last Modified: 2011-09-20
Hello,

I am in a loop and I want to increment ProgressBar.Position by 0.42

But when I am trying to do so as fellow:

ProgressBar.Position := ProgressBar.Position + 0.42;

I am getting [Pascal Error] ... Incompatible types: 'Integer' and 'Extended'

How can I solve this?

Your help would be greatly appreciated.
0
Comment
Question by:AngryC
2 Comments
 
LVL 15

Expert Comment

by:mikelittlewood
ID: 16801642
Because the values that can be associated with the ProgressBar.Position can only be whole numbers (1,2,3,...)
0
 
LVL 17

Accepted Solution

by:
TheRealLoki earned 80 total points
ID: 16801653
a)
you could set Progressbar1.Max to 10000 instead of 100
and  do
progressbar.position := progressbar.position + 42;

b) you could keep the value i another extended variabnle, update that instead, but only show the rounded value on the progressbar

var
   realposition: double;
begin

realposition := 0
progressbar.position := 0;
...

realposition := realposition + 0.42;
ProgressBar.Position := Round(realposition);  // eg. if realposition was 0.42, progressbar would show 0,if it was 1.26 the progressbar would show 1

0

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Question has a verified solution.

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

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
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…
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Kernel Data Recovery is a renowned Data Recovery solution provider which offers wide range of softwares for both enterprise and home users with its cost-effective solutions. Let's have a quick overview of the journey and data recovery tools range he…
Suggested Courses
Course of the Month13 days, 3 hours left to enroll

579 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