Page 1 of 1
Load field into mobile browser control
Posted: Thu Dec 21, 2017 7:54 pm
by yeldarb
Is there any way to load a field's content into a mobile browser control? (short of writing it out as a file and loading that)?
Re: Load field into mobile browser control
Posted: Fri Dec 22, 2017 12:22 am
by quailcreek
What's in the field and why do you need to load it into a browser?
Re: Load field into mobile browser control
Posted: Fri Dec 22, 2017 12:38 pm
by Klaus
Hi yeldarb,
if you use a browser widget, you can set its "htmltext" property to the htmltext of your field.
No idea if this is supported with "mobilecontrolset..."
Best
Klaus
Re: Load field into mobile browser control
Posted: Fri Dec 22, 2017 2:43 pm
by yeldarb
The field contains the raw html, which includes (among other things) a styled bar chart that requires the mobile browser control to render (I tried just the field but it doesn't read and render CSS). If there's a way to render the CSS in a field that might work (though it wouldn't have the nice native "bounce" effect).
Re: Load field into mobile browser control
Posted: Fri Dec 22, 2017 2:58 pm
by yeldarb
Wow, great! I wasn't even aware of the browser widget.
So I just tested on iOS, simulator and device, and it looks great but internal hyperlinks don't seem to be working.
Re: Load field into mobile browser control
Posted: Fri Dec 22, 2017 3:18 pm
by Klaus
The LC "htmltext" property does unfortunatley not support CSS and only a very limited subset of HTML.
Re: Load field into mobile browser control
Posted: Fri Dec 22, 2017 9:18 pm
by yeldarb
Klaus wrote: ↑Fri Dec 22, 2017 3:18 pm
The LC "htmltext" property does unfortunatley not support CSS and only a very limited subset of HTML.
Using the browser widget and a stylesheet in the html document I'm able to get a nicely styled bar graph:
However, I'm running into two other issues:
1. I get an error "cannot export char U+0000 in nul-terminated string buffer" It doesn't seem to be related to the actual text in the field, I've removed all the text and just used some dummy text.
2. Links to anchors in the page don't work (they work in the mobile widget).
Re: Load field into mobile browser control
Posted: Fri Dec 22, 2017 9:37 pm
by Klaus
Maybe I was not clear enough, the internal htmltext property (of fields!) does not support all the good stuff. The browser widget is another beast, of course.
