Archived

This topic is now archived and is closed to further replies.

waz2

statusbar1

Recommended Posts

waz2    122
how do i link a status bar to button 1 in delphi? i want to click the first button and have the status bar go forward this is purly cosmetic and serves no purpose to my code so i just want the bar to move from min 0 to max 10000 on the event of clicking button 1. cheers in advance this has been driving me crazy

Share this post


Link to post
Share on other sites
Sly    128
I think you are referring to a progress bar, not a status bar. A status bar is the control that sits along the bottom of the window like at the bottom of your IE window.

To change the position of a TProgressBar, simply set the value of the Position property to the desired value. If you want to go to the maximum value, then set it to the value of the Max property.

ProgressBar1.Position := ProgressBar1.Max;



Steve 'Sly' Williams
Tools Developer
Krome Studios

Share this post


Link to post
Share on other sites
Sly    128
Oh, and to link it to the button On Click event, double-click on the button in design-mode. This will create an event handler in the code for the button something like the following:

procedure TForm1.Button1Click(Sender: TObject);
begin

end;

In between the begin and end statements is where you put the code to change the position of the progress bar as mentioned in the previous message.

For more help, select the component on the form in design-mode and press F1.



Steve 'Sly' Williams
Tools Developer
Krome Studios

Edited by - Sly on November 1, 2000 5:48:57 PM

Share this post


Link to post
Share on other sites