Webview (HTML Viewer) window size

Discussions about CSEntry
Forum rules
New release: CSPro 8.0
Post Reply
htuser
Posts: 631
Joined: December 19th, 2011, 6:26 pm
Location: Silver Spring Area, MD, USA

Webview (HTML Viewer) window size

Post by htuser »

Dear CSPro Development Team,
I would like to display HTML page in a webview window that fit to content(Aka HTML viewer in CSEntry). An example from Josh (https://github.com/jhandley/cspro-D3-charts) can easily show the issue with the HTML Viewer window.

I think the HTML Viewer height and width are not controlled by the CSS or Javascript, but only with native settings (in Java on Android and other programming languages in Windows).
https://stackoverflow.com/questions/359 ... -to-screen
https://stackoverflow.com/questions/254 ... -to-screen
https://stackoverflow.com/questions/390 ... n-absolute

A solution would come in CSPro logic with some attributes in the view function that wrap native functions and allow us to fit the HTML Viewer windows size accordingly to contents (or window size defined in CSS).

Thanks in advance for your help!
G.VOLNY, a CSProuser from Haiti, since 2004
Gregory Martin
Posts: 1777
Joined: December 5th, 2011, 11:27 pm
Location: Washington, DC

Re: Webview (HTML Viewer) window size

Post by Gregory Martin »

We've been thinking about reworking some of the logic elements that have UI (errmsg/accept/etc.) to HTML. If we do this, we'll also need to have a way to modify the window size to fit the HTML better (as you won't want the error message to take up 90% of the screen). If we do this, we can also look into adding a way for you to specify this in logic (or via a JavaScript call).
htuser
Posts: 631
Joined: December 19th, 2011, 6:26 pm
Location: Silver Spring Area, MD, USA

Re: Webview (HTML Viewer) window size

Post by htuser »

Thanks Greg for thinking to implement this for CSProusers.
Hopefully you always think how much it is to give more control over CSPro application UI. Right now, a small control over the HTML viewer Window in the view function is welcome.

Also, we'll be able to take more advantage of the new JavaScript -> CSPro interactivity if we can directly pass data between Webview and CSEntry and also from CSEntry to Webview.
Josh already implemented a way to transform CSEntry data to json and use them for displaying charts in Webview. A more direct way would facilitate.

Best,
G.VOLNY, a CSProuser from Haiti, since 2004
Post Reply