Smart Mobile Studio 1.1 contains many new controls which I hope to describe in the following days. Today I’ll start with a group of three controls which allow the programmer to insert specific HTML elements (a.k.a. tags) on a Smart form.
The usage is simple. You drop a a control on a form, resize it to an appropriate size and write few lines of code.
W3IFrameHtmlElement1.Src := 'http://www.youtube.com/embed/WcLrcFPBK7c';
W3DIVHtmlElement1.InnerHTML := 'div element';
W3PREHtmlElement1.InnerHtml := 'pre element';
To set content for the DIV and PRE elements you simply assign a string to the InnerHTML property. A source location for the IFrame element is set by assigning to the Src property.
If you check the document contents, you’ll see that there are indeed an iframe, div and pre elements on the form.
You can download the code at www.gabrijelcic.org/Smart/HTMLElements/HTMLElements.opp and test it at www.gabrijelcic.org/Smart/HTMLElements/bin/index.html.