Jump to content
Nicolò Blunda

OnPaint event of TPaintBox control

Recommended Posts

Maybe I'm just poor familiar with FMX graphics, but I don't understand why the TPaintBox control's OnPaint event fires when all other controls on the Form gain or lose focus.

Share this post


Link to post

Not 100% sure, but some bugs might be the cause:

 

1) TControl.DoGetUpdateRect

There is no check for an empty R (TRectF) and that affects Result := UnionRect(Result, R);

 

2) TControl.GetUpdateRect

Some like TStyledEditContent.DoGetUpdateRect do return a rect starting at (0, 0).

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×