your Edit displaying the counter value has no AutoSize
@wp,Sorry, I got confused because I did also other tests. Without the modification in the RealGetSize method, the counter incremented even when the form caption was used to display the value rather than the edit.Quoteyour Edit displaying the counter value has no AutoSize
edit has autosize !
I did some more tests: Added a TPanel (or a TPaintbox for a TCustomControl) and put your ResizeCounter into the OnResize event. Notice that here the counter does NOT increment
This demontrates that the LCL controls do not show this issue.
As I wrote I suspect the slow switching performance is due to your own components
Anyway now I need help in case of real resizing, since in this case I need hard-recomputing, I am looking for something that works "after" resizing is complete (eg when the user resize the form with mouse I would like to do a single Hard-refresh at the end of user interaction).Sorry, I don't know in detail what you are talking about. It could also be that you are trying to reinvent the wheel because the LCL can handle a lot of sizing issues amazingly well (anchoring, auto-sizing, ... - that's why the sizing code is so complex). Please read https://wiki.freepascal.org/Autosize_/_Layout#Custom_Controls.
Anyway now I need help in case of real resizing, since in this case I need hard-recomputing, I am looking for something that works "after" resizing is complete (eg when the user resize the form with mouse I would like to do a single Hard-refresh at the end of user interaction).It's impossible to know. Example: The user grabs the edge of the form, and slowly resizes pixel by pixel. When is the resize finished? When the user takes more than 1 second, between two increases? Or half a second? or 2 seconds?...
It avoids the continous hard-recomputing in the refresh (even if not real resizing is happening, this part for me it is still obscure)).
@wp I did some change, now it works "quickly" after moved the logic in DoOnResize.
It avoids the continous hard-recomputing in the refresh (even if not real resizing is happening, this part for me it is still obscure).
Anyway now I need help in case of real resizing, since in this case I need hard-recomputing, I am looking for something that works "after" resizing is complete (eg when the user resize the form with mouse I would like to do a single Hard-refresh at the end of user interaction).
thank you in advance.
So you should split
- the work to compute what should be painted (which can potentially take a long time)
- painting the result (i.e. copy a bitmap, or output text at the pre-determined position, or....)