Hello!

I want to paint a progress bar to a canvas of a TStringGrid.

  ProgressBar := TProgressBar.Create(MyStringGrid);
  if Assigned(ProgressBar) then
  begin
    ProgressBar.Parent := MyStringGrid;
    ProgressBar.Visible := false;
    ProgressBar.Left := GridCellRect.Left;
    ProgressBar.Top := GridCellRect.Top;
    ProgressBar.Width := GridCellRect.Right - GridCellRect.Left;
    ProgressBar.Height := GridCellRect.Bottom - GridCellRect.Top;
    ProgressBar.Min := 0;
    ProgressBar.Max := 100;
    ProgressBar.Position := TheProgressValue;
    ProgressBar.Orientation := pbHorizontal;
    ProgressBar.PaintTo(MyStringGrid.Canvas, GridCellRect.Left,
GridCellRect.Top);
    FreeAndNil(ProgressBar);
  end;

With Delphi this works, but with Lazarus no progress bar appears.
Can someone tell me how to paint the progress bar successfully?

Stefan
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to