frameColor doesn't match Docs

  1. 3 months ago

    Dave S

    Jul 11 San Diego, California USA

    This value is useful when you are using Canvas controls to create custom controls. When drawing objects, use this color for the object’s frame. ListBoxes, for example, use this color to draw the dark frame around the ListBox.

    While in fact a listbox does have a dark border (in lite mode) and a light border in darkmode.... If I apply this in a custom canvas control, the color is ALWAYS light

  2. Norman P

    Jul 11 Pre-Release Testers, Xojo Pro
    Edited 3 months ago

    not seeing that here
    I just dropped a canvas on a window layout plus a text area and listbox
    I made the text area the first control in the tab order so the listbox doesnt get focus
    in the canvas paint event I simply put

     g.forecolor = framecolor
     g.fillrect 0,0,g.width,g.height

    the color that canvas is filled with switches in light and dark modes as I expect

    When are you trying to use the color ? in the paint event or somewhere else ?

  3. Dave S

    Jul 11 San Diego, California USA

    the last lines of my PAINT event

    If border Then 
      // g.ForeColor=FrameColor - doesn't work properly for darkmode
      If Not IsDarkMode Then 
      End If
      g.drawrect 0,0,g.Width,g.Height
    End If

    This is my "band-aid"

or Sign Up to reply!