HTMLViewer Border

  1. 5 years ago

    William B

    30 Nov 2013 Pre-Release Testers, Xojo Pro

    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.

    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

  2. Greg O

    30 Nov 2013 Xojo Inc

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

  3. William B

    30 Nov 2013 Pre-Release Testers, Xojo Pro

    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?

  4. Rob V

    1 Dec 2013 Pre-Release Testers Answer Indianapolis, IN

    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

  5. William B

    1 Dec 2013 Pre-Release Testers, Xojo Pro

    That worked! Many thanks -Will

  6. 4 years ago

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

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

  7. Michel B

    4 Nov 2014 Pre-Release Testers RubberViews.com

    @Walter S How do you guys do that ? I cannot find such option in Xojo Windows :(

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

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

  8. Ops! Yes, I am referring to Desktop.

    Edit: Figured it out! Left -2 and Top -2 :) It's okay it works

  9. 5 weeks ago

    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

  10. Edited 5 weeks ago

    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:

    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("<html>")
    t.WriteLine("<style>")
    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("</style>")
    t.WriteLine("<body bgcolor=""#E6E6FA"">")
    t.WriteLine("<body>")
    t.WriteLine("<img src=""" + background_image_gif.UrlPath + """></img>")
    t.WriteLine("</body>")
    t.WriteLine("</html>")

    t.Close
    'Call StartupWindow.load
    End Sub

or Sign Up to reply!