Gray Background...

  1. 4 days ago

    christian b

    Apr 16 Pre-Release Testers, Xojo Pro Switzerland

    Where is the gray background on top/bottom from when scrolling an iOSHtmlViewer on an iOSContainerControl?
    How to change the color to make it disapear?

  2. Jeremie L

    Apr 16 Pre-Release Testers, XDC Speakers Europe (France)

    I am sure you have the same gray background when the htmlviewer is placed directly in an iOSView.

    This should help:

    Dim c As Color = &cFF0000 //Red color
    Declare Function NSClassFromString Lib "Foundation" (className As CFStringRef) As Ptr
    Declare Function colorWithRGBA Lib "UIKit.framework" Selector "colorWithRed:green:blue:alpha:" ( UIColorClassRef As Ptr, red As CGFloat, green As CGFloat, blue As CGFloat, alpha As CGFloat) As Ptr
    Declare Function view Lib "UIKit.framework" Selector "view" (UIViewController As Ptr) As Ptr
    Declare Sub setBackgroundColor Lib "UIKit.framework" Selector "setBackgroundColor:" (UIView As Ptr, UIColor As Ptr)
    Dim UIColorClassPtr As Ptr =  NSClassFromString("UIColor")
    Dim colorPtr As ptr = colorWithRGBA(UIColorClassPtr, ( / 255.0), (c.Green / 255.0), (c.Blue / 255.0), (1.0-c.Alpha/255.0))
    Dim viewPtr As Ptr = HTMLView.Handle
    setBackgroundColor(viewPtr, colorPtr)

or Sign Up to reply!