Page 1 of 1

Browser vs Fields?

Posted: Tue Mar 28, 2017 6:19 pm
by the_wesley_watkins
I am building an educational app that will require a lot of text on screen. Right now, I am using a graphics screen and just representing all the text with fields. However, I do have some knowledge in HTML. I am wondering would it be better to write HTML and use a browser to display all of each of the screens or should I continue on using a graphics screen and fields. The only problem I am having with fields is that I feel as if sometimes I do not have the control I want over line-spacing and other small visual elements. What do you guys think?

Re: Browser vs Fields?

Posted: Wed Mar 29, 2017 7:30 am
by Dutchman
I agree, text fields give little control over bold-face font-height etc.
Therefore I used browser-windows in my word-search program. I would welcome therefor, functions which write the proper commands to the browser windows. It is still on my "to-do" list :D

Re: Browser vs Fields?

Posted: Sat Apr 22, 2017 3:00 am
by GeorgeMcGinn
Also using the browser instead, you can in many field sizes use percentages for size instead of fixed pixels, and that means running it on an iPad or iPhone, it will properly size itself.

But there are some HTML tags that you can't do that with, such as the IMG tag.

Re: Browser vs Fields?

Posted: Mon May 08, 2017 2:54 pm
by rbytes
It is possible using string concatenation to embed smart Basic variables into your HTML code. A simple example would be:
txt$="My HTML text"
tag1$="<H1>"
tag2$="</H1>"
html$=tag1$&txt$&tag2$

The text will print at heading level 1 (largest size).
Now just by changing the variables tag1$ and tag2$, you can change the size of the web text while your program is running. This same technique can be used to dynamically change colors, image sizes, links, tables and anything else in the HTML code. I have even modified javascript code within my HTML this way. If you need to insert a quote, just use a quote sandwiched between two other quotes to define it, e.g. """