statusbar1

Started by
3 comments, last by waz2 23 years, 5 months ago
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
Advertisement
and errr yes im new to codeing
Ummm....
StatusBar1.Position := StatusBar1.Max;
??


------------------------------
BCB DX Library - RAD C++ Game development for BCB
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
Steve 'Sly' Williams  Monkey Wrangler  Krome Studios
turbo game development with Borland compilers
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
Steve 'Sly' Williams  Monkey Wrangler  Krome Studios
turbo game development with Borland compilers

This topic is closed to new replies.

Advertisement