iOS Question Only change border color

Discussion in 'iOS Questions' started by JanPRO, May 2, 2015.

  1. JanPRO

    JanPRO Well-Known Member Licensed User


    is there a way to only change the border color of a view? I already tried this:

    Dim no As NativeObject = Panel1
  2. klaus

    klaus Expert Licensed User

    Use simply the SetBorder(Width As Float, Color As Int, CornerRadius As Float) method.
  3. JanPRO

    JanPRO Well-Known Member Licensed User

    Yeaahh, I know this method.
    But I want to give users the option to change the whole app design, also the border colors. And for that I use the following loop:

    For Each v As View In Page_Main.RootPanel.GetAllViewsRecursive

    If v Is Panel Then
    Dim pn As Panel = v
    'Now I only want to change the color, and because I don't know the color witdh and the corner radius, I can't use SetBorder
       End If


    When I use this:

    I get the following error: Unsupported type ^{CGColor=}
    Last edited: May 2, 2015
  4. klaus

    klaus Expert Licensed User

    I gave you an answer to your question.
    Now it's another problem, never tried it that way.
  5. Erel

    Erel Administrator Staff Member Licensed User

    You can use this code:
    Private Sub Page1_Resize(Width As Int, Height As Int)
    Dim no As NativeObject = SegmentedControl1
       no = no.GetField(
    "borderWidth").AsNumber, Colors.Red, _
    End Sub
    Alexander Stolte and JanPRO like this.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice