내 paintbox에 이미지를 페인트하는 기능은 2 곳에서 호출됩니다. TPagecontrol 페이지 변경에서 호출하면 제대로 작동하지만 form.formresize (...)에서 호출하면 이미지가 그려진 페인트 상자는 즉시 페인트 칠되어 완전히 흰 색을 띠게됩니다. 이 malefinction에서 오는 어떤 순서에서 어떤 생각 ---Paintbox 다시 그리기
procedure TForm.FormResize(Sender: TObject);
begin
// frist image shown and then re painted white ???
PaintImage2PaintBox(……….);
end;
procedure TForm.pgc_mainmenuChange(Sender: TObject);
begin
// works fine as expected after pagecontrol tab change
PaintImage2PaintBox(……….);
end;;
procedure PaintImage2PaintBox(……….);
begin
/// draw into a PaintBox
end;
그리기 코드가 OnPaint에 있다고 생각하지 않습니다. –