Scale in Webview

Scale in Webview

Postby Natter » Fri Feb 10, 2023 7:47 pm

Hi,

Is it possible to scale in Webview ?
Natter
 
Posts: 1215
Joined: Mon May 14, 2007 9:49 am

Re: Scale in Webview

Postby cnavarro » Fri Feb 10, 2023 8:09 pm

Zoom?
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
cnavarro
 
Posts: 6541
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Scale in Webview

Postby Natter » Sat Feb 11, 2023 9:49 am

Yes. On the webview object, I set the desired zooming ctrl+ and ctrl-. Is it possible to automatically set this zooming every time a webview element is created ?
Natter
 
Posts: 1215
Joined: Mon May 14, 2007 9:49 am

Re: Scale in Webview

Postby Horizon » Sat Feb 11, 2023 6:32 pm

Hi,

Can you please try it?

Code: Select all  Expand view
oWebView:Eval('document.body.style.zoom = 2')
Regards,

Hakan ONEMLI

Harbour & MSVC 2022 & FWH 23.04
Horizon
 
Posts: 1322
Joined: Fri May 23, 2008 1:33 pm

Re: Scale in Webview

Postby Natter » Sat Feb 11, 2023 7:27 pm

Thank you, Horizon! And what is 2 ? This is 200% ?
Natter
 
Posts: 1215
Joined: Mon May 14, 2007 9:49 am

Re: Scale in Webview

Postby cnavarro » Sun Feb 12, 2023 3:50 am

Horizon wrote:Hi,

Can you please try it?

Code: Select all  Expand view
oWebView:Eval('document.body.style.zoom = 2')


Please, read ( zoom feature is non-standard and is not on a standards track )
https://developer.mozilla.org/en-US/docs/Web/CSS/zoom
Use scale() ( transform: scale( ... ) )
https://developer.mozilla.org/en-US/doc ... tion/scale
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
cnavarro
 
Posts: 6541
Joined: Wed Feb 15, 2012 8:25 pm
Location: España


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Willi Quintana and 47 guests