I've a VCL Component that i want to port it into FMX
type
TMyVclComponent = class (TCustomControl)
...
procedure TMyVclComponent.MouseUp (Button: TMouseButton; Shift: TShiftState; X, Y: Single);
begin
FIsMouseDown: = false;
end;
procedure TMyVclComponent.Paint;
begin
if csDesigning in ComponentState then
with inherited Canvas do begin
Pen.Style: = psDash;
Brush.Style: = bsClear;
Rectangle (0, 0, Width, Height);
end;
TBackground(FBackground).PaintOn(FBitmapPreveiw);
Canvas.Draw (0, 0, FBitmapPreveiw);
end;
My porting progress :
type
TMyFMXComponent = class(TStyledControl)
...
procedure TMyFMXComponent.MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Single);
begin
FIsMouseDown := false;
end;
procedure TMyFMXComponent.Paint;
begin
{
How can we port this code part ?
}
if csDesigning in ComponentState then
with inherited Canvas do begin
Pen.Style := psDash;
Brush.Style := bsClear;
Rectangle(0, 0, Width, Height);
end;
TBackground(FBackground).PaintOn(FBitmapPreveiw);
Canvas.Draw(0, 0, FBitmapPreveiw);
end;
How the code inside the Paint procedure can be ported to FMX ?
Вопрос
randydom
I've a VCL Component that i want to port it into FMX
My porting progress :
type TMyFMXComponent = class(TStyledControl) ... procedure TMyFMXComponent.MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Single); begin FIsMouseDown := false; end; procedure TMyFMXComponent.Paint; begin { How can we port this code part ? } if csDesigning in ComponentState then with inherited Canvas do begin Pen.Style := psDash; Brush.Style := bsClear; Rectangle(0, 0, Width, Height); end; TBackground(FBackground).PaintOn(FBitmapPreveiw); Canvas.Draw(0, 0, FBitmapPreveiw); end;How the code inside the Paint procedure can be ported to FMX ?
thank you .
1 ответ на этот вопрос
Рекомендуемые сообщения
Присоединяйтесь к обсуждению
Вы можете написать сейчас и зарегистрироваться позже. Если у вас есть аккаунт, авторизуйтесь, чтобы опубликовать от имени своего аккаунта.