I want to paint the background of a TWebScrollBox myself (draw a grid). When I overwrite the "Paint" procedure in my component "TMyBox= class(TWebScrollBox)" the canvas proptery is nill. Is there a way to use the canvas property of TWebScrollBox?
procedure TMyBox.Paint;
var
iRect : TRect;
begin
Canvas.BeginScene; // <-- Not working
Canvas.Brush.Color := clMoneyGreen;
iRect := Rect(-1,-1,Width,Height);
Canvas.FillRect(iRect);
...
Draw a grid
...
Canvas.EndScene;
end;