Skip to main content
gamedev.net
🔒 Locked

statusbar1

Started by waz2 Nov 1, 2000 at 11:38 AM 3 replies 350+ views
Original Post
waz2
waz2
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
waz2
waz2
and errr yes im new to codeing
Sly
Sly
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
Sly
Sly
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

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.