Recent

Author Topic: TProgressBar does not come up  (Read 7255 times)

endik

  • New Member
  • *
  • Posts: 29
TProgressBar does not come up
« on: May 21, 2007, 06:58:16 pm »
some can help how to create ProgresBar dynamically?

this does not work:

Code: [Select]
progres:=TProgressBar.Create(nil);
 progres.Orientation:=pbHorizontal;
 progres.Left:=570;
 progres.Top:=40;
 progres.Height:=30;
 progres.Width:=450;
 progres.Position:=0;
 progres.Max:=imax;
 progres.BarShowText:=True;
 progres.Smooth:=True;
 progres.Step:=1;
 progres.Visible:=True;

...

 progres.Free;

antonio

  • Hero Member
  • *****
  • Posts: 605
RE: TProgressBar does not come up
« Reply #1 on: May 21, 2007, 07:04:43 pm »
When you set Parent (progress.Parent) this will work.

endik

  • New Member
  • *
  • Posts: 29
TProgressBar does not come up
« Reply #2 on: May 21, 2007, 07:16:10 pm »
thanks Antonio for so quick answer, unfortunately I could not find anything about this option so I was not able to fix it. Could you be more detailed by adding a correct value for .Parent?

endik

  • New Member
  • *
  • Posts: 29
TProgressBar does not come up
« Reply #3 on: May 21, 2007, 07:24:35 pm »
ok, I have found it, it should be address to component which progres is expected to be created on

thanks anyway

antonio

  • Hero Member
  • *****
  • Posts: 605
TProgressBar does not come up
« Reply #4 on: May 21, 2007, 07:34:03 pm »
The parent can be a control or a form. Normally, it's the control where you put your control (progressbar) at design time.

 

TinyPortal © 2005-2018