HtmlViewer icon indicating copy to clipboard operation
HtmlViewer copied to clipboard

DPI scaling THTMLViewer

Open xraymike opened this issue 4 years ago • 2 comments

Thank you for THTMLViewer; it's been a very useful component for us!

How can I scale THTMLViewer to different DPI's? I'm loading the component from a string.

For the moment, the only thing that works is doing the following in form's OnAfterMonitorDpiChanged:

  1. scale the control's font
  2. load the content again

Reload( ) doesn't help because I don't want to load a file.

I could subclass it and have that class keep the content so it can be refreshed internally.

Maybe it's best to use the LoadFromDocument( ) method and instantiate a TBuffer instance that I can reuse.

I would've thought the component would natively support this. Am I missing something?

Thank you!

xraymike avatar Jan 18 '22 17:01 xraymike

Currently THTMLViewer does not support DPI Scaling, but it is planned to implement it soon.

BerndGabriel avatar May 21 '22 13:05 BerndGabriel

Thank you!

xraymike avatar May 21 '22 22:05 xraymike