Line in UI drawing incorrectly

This happens on both OSX and Windows. I have a window with a line on it. When run in the IDE the windows appears like this.

If I quit out, open the window layout in the IDE, don’t touch anything and run again it is correct.

Any ideas?

Lines are king of buggy. Use a 1 pix high rectangle instead.

Or a 2 px high rectangle with the top border white and the bottom border black. Gives a 3d effect :wink:

@Michel Bujardet Thanks Michel. I’ll give that a go. I wasn’t aware that lines are buggy. I honestly can’t remember the last time I used one!

They just became buggy with a recent Xojo release, I think it was 2014r2. All of my lines from previous versions looked like your first picture. I’m surprised that the line ever behaved normally.

Just use a separator

This is what I ended up doing. I remembered that it existed when I went in to implement Michel’s suggestion.

Never used separators, but they are indeed quite fine. For angled lines, a canvas and drawline maybe the workaround to go, since lines seem unreliable.

I totally lost the content of my window when tried … so I didn’t try again!
But its not just Xojo that seems to have problems with lines… I can’t recall which ide it was but I’ve come across it before hence why I just dismissed it as an option