You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've got an issue with the with the TBGRAGraphicControl component. When I reposition for example a button on the form from within the onredraw, the canvas turns transparent for a moment, before painting it. This does not happen with the TBGRAVirtualScreen. This is the test code I use:
procedure TForm1.FormCreate(Sender: TObject);
begin
with BGRAGraphicControl1
do begin
Align:=alLeft;
BevelOuter := bvNone;
Color := clYellow;
ColorOpacity:=255;
Caption := '';
end;
with BGRAVirtualScreen1
do begin
Align:=alRight;
Caption := '';
end;
end;
procedure TForm1.FormResize(Sender: TObject);
begin
BGRAGraphicControl1.Width := (Form1.Width div 2);
BGRAVirtualScreen1.Width := Form1.Width - BGRAGraphicControl1.Width-10;
end;
procedure TForm1.BGRAGraphicControl1Redraw(Sender: TObject; Bitmap: TBGRABitmap);
begin
Bitmap.FillRect(0, 0, Bitmap.Width, Bitmap.Height, clLime);
sleep(10); // To make it a little bit more visible
Button1.Left := (Form1.Width div 2); // <--- enable this and the screen flickers
end;
procedure TForm1.BGRAVirtualScreen1Redraw(Sender: TObject; Bitmap: TBGRABitmap);
begin
Bitmap.FillRect(0, 0, Bitmap.Width, Bitmap.Height, clRed);
sleep(10); // To make it a little bit more visible
//Button1.Left := (Form1.Width div 2); // <--- enable this and the screen won't flicker (and disable the above)
end;
Is this fixable? I've looked into the onredraw source, but can't find a problem there.
Best regards, Maarten
The text was updated successfully, but these errors were encountered:
That's kind of normal. The thing is you need to decide where the button is before redrawing the content. What is supposed to trigger the button to move? Surely not the update of the graphic control.
Hi,
I've got an issue with the with the TBGRAGraphicControl component. When I reposition for example a button on the form from within the onredraw, the canvas turns transparent for a moment, before painting it. This does not happen with the TBGRAVirtualScreen. This is the test code I use:
Is this fixable? I've looked into the onredraw source, but can't find a problem there.
Best regards, Maarten
The text was updated successfully, but these errors were encountered: