Page 1 of 1

iphonecontrolset browser

Posted: Mon Feb 20, 2012 3:50 pm
by teacherguy
I see how you can change the background color of the area behind the "bounce" but is there a way to change the standard white background of the browser to say black?

Re: iphonecontrolset browser

Posted: Mon Feb 20, 2012 4:26 pm
by gpb01
You can use

Code: Select all

iphoneControlSet browserID, "backgroundColor", "R,G,B,A"
... where browserID is the Id of your browser, R,G,B are the color values and the A is the Alpha channel for the transparency.

Guglielmo

Re: iphonecontrolset browser

Posted: Mon Feb 20, 2012 6:15 pm
by teacherguy
But that is for the area behind the bounce, unless I'm not understanding...

Re: iphonecontrolset browser

Posted: Mon Feb 20, 2012 6:45 pm
by Klaus
Hi teacherguy,

looks like you cannot do this directly but only with an appropriate HTML page.
One with its background color set in the html/css source.


Best

Klaus

Re: iphonecontrolset browser

Posted: Mon Feb 20, 2012 6:45 pm
by gpb01
Sorry teacherguy, maybe is me that not understanding ...
... to be clear ... do you want to change 1) the background color of the html page that you show in the browser window or 2) the background color of the browser window itself ?

Because the first you can do in the html code, the second with the statement that I have shown you ... :)

Guglielmo

Re: iphonecontrolset browser

Posted: Mon Feb 20, 2012 7:31 pm
by teacherguy
I would like to change the white of the actual html page. I am loading an image file into it and I would rather the image have black behind it, not white.

Re: iphonecontrolset browser

Posted: Mon Feb 20, 2012 7:36 pm
by Klaus
Hi teacherguy,

this is ruled by the HTML/CSS code of the page!
So change the HTML/CSS you are going to display if you can! 8)


Best

Klaus

Re: iphonecontrolset browser

Posted: Mon Feb 20, 2012 7:38 pm
by teacherguy
Ah, my latest chapter in being clue-less begins!!

I am loading images from a file stored locally on the iPhone into a browser instance. So.....what html/css is there in that? :shock:

Re: iphonecontrolset browser

Posted: Mon Feb 20, 2012 7:54 pm
by Klaus
Hi teacherguy,

AHA! :D

Well, in that case there is no HTML involved, right.
Then you cannot change the background color of the display 8)

But maybe you can create a (temporary) html source on the fly and "embed"
your image(s) into that page via an <img> html tag...


Best

Klaus

Re: iphonecontrolset browser

Posted: Mon Feb 20, 2012 7:56 pm
by sturgis
EDIT: Klaus is too darn fast. What he said!

So you're just pointing at the image file itself? Then yeah, no way to set any html/css attributes.

However, html as simple as the following should work..
<html><body bgcolor="#000000">
<img src="replace/with/path/to/image.jpg">
</body></html>

I don't think you can set the htmltext of the ios browser control directly, maybe write the file to the temporary folder then load it up from there with <img src= pointing to the image you wish to display.

Could even use merge for this. Put the path to the image into a variable, have the simple html source in a property and change <img src="[[variablename]]"> so that you can: put merge(the htmlthingy of this stack) into url "binfile:path/to/myhtmlpage.html"

teacherguy wrote:Ah, my latest chapter in being clue-less begins!!

I am loading images from a file stored locally on the iPhone into a browser instance. So.....what html/css is there in that? :shock:

Re: iphonecontrolset browser

Posted: Mon Feb 20, 2012 8:21 pm
by teacherguy
Thanks, so first step is to create an html file that is saved locally on the iphone that I will load the merged info to, and then I'm loading that file into the browser instance?

Re: iphonecontrolset browser

Posted: Mon Feb 20, 2012 11:46 pm
by sturgis
teacherguy wrote:Thanks, so first step is to create an html file that is saved locally on the iphone that I will load the merged info to, and then I'm loading that file into the browser instance?
Pretty much, yeah. I have no way to actually test on iphone/ipad but as klaus said, a small html file that sets the bgcolor and has an <img.. tag pointing to the image itself should work. (tried it in the desktop, works there but without the ability to test on ios, can't tell you what issues you might have)