HTMLViewer Border

Is it possible to remove the grey border around the HTMLViewer control? I need to have the HTML blend in seamlessly with the rest of the page.

You may be able to apply a style to the page to remove the border.

Thanks Greg, but in an application of a style sheet I can’t find a way to turn off the border. Can you give an example?

Add a style and choose none for the borders. Then apply the style in the inspector for your HTML Viewer. Hopefully that works for ya.

Xojo Styles Help Photo

That worked! Many thanks -Will

How do you guys do that ? I cannot find such option in Xojo Windows :frowning:

Also, is it possible to programmatically detect whether the Native renderer is available before going for WebKit ?

[quote=141203:@Walter Sander]How do you guys do that ? I cannot find such option in Xojo Windows :frowning:

Also, is it possible to programmatically detect whether the Native renderer is available before going for WebKit ?[/quote]

This is a Web thread. You are referring to Desktop HTMLViewer, right ?

Ops! Yes, I am referring to Desktop.

Edit: Figured it out! Left -2 and Top -2 :slight_smile: It’s okay it works

Hi,

The solution from Walter worked for me.
i had to make left -8 and top -8.
But is this the only soulution?

I need to display the Html-Viewer inside a window that is bigger than the HTML-Viewer.

The Link above from Rob didnt work.
Is there a example for “add a Style and choose none for the borders”

Best Regards,
Christian

I found a soulution:
The background-color in HTML-viewer is defined in the css.
so i created a html-file that browses the gif.

code ist:

[quote]Public Sub create_gif_html_file()

Dim bc As Color = settings.value(“background_color”)
StartupWindow.gif_html_file.Delete
Dim t As TextOutputStream
t = TextOutputStream.Create(StartupWindow.gif_html_file)
t.WriteLine("")
t.WriteLine("")
t.WriteLine(“img {”)
t.WriteLine(" width: 100%;")
t.WriteLine(" height: 100%;")
t.WriteLine(" margin: 0;")
t.WriteLine(" padding: 0;")
t.WriteLine("}")
t.WriteLine(“body {”)
If settings.Value(“use_background_color”) = “true” Then
t.WriteLine(" background-color: rgb(" + Str(bc.Red) + “, " + Str(bc.Green) + “, " + Str(bc.Blue) + “);”)
Else
t.WriteLine(” background-color: rgb(228,228,228);”)
End
t.WriteLine(" padding: 0;")
t.WriteLine(" margin: 0;")
t.WriteLine("}")
t.WriteLine("")
t.WriteLine("<body bgcolor=""#E6E6FA"">")
t.WriteLine("")
t.WriteLine("<img src=""" + background_image_gif.UrlPath + “”">")
t.WriteLine("")
t.WriteLine("")

t.Close
'Call StartupWindow.load
End Sub

[/quote]