It seems to be impossible to draw a simple right-top to left-bottom graphic line in the IDE. All lines end up left-top to right-bottom, no matter how I use the mouse or edit Properties. Or am I overlooking something?
My current version: Release 2017 1.1
[quote=376862:@Joop Riem]It seems to be impossible to draw a simple right-top to left-bottom graphic line in the IDE. All lines end up left-top to right-bottom, no matter how I use the mouse or edit Properties. Or am I overlooking something?
My current version: Release 2017 1.1
Thanks,
Joop Riem
[/quote]
This is an old bug with the Line control.
If you need to see a line in the layout editor, as opposed to drawing it in code, use the Rectangle control with the height of one pixel.
The line control is extremely buggy. I stopped using it years ago because it seemed to have a life of its own at runtime, and did not keep where I had placed it into the IDE.
I guess the Junior programmer handled this in Xojo’s source…? It was already almost impossible to use graphic objects in RealStudio due to vanishing visual control, and now, 10 years later, it still has issues, and so simple to correct. Shame on you, Xojo!
Your suggestion to use a Rectangle with a one pixel height isn’t the solution either. Horizontal and vertical lines are not the problem, only right slanted, which your suggestion doesn’t handle.
Until Xojo is willing to resolve this issue I am using a subclass of Line with one extra Property: ‘reversed’. In the Constructor it will swap X1 and X2, and Y1 and Y2 when this Boolean is set. In the IDE it looks very ugly because of the wrong orientation displayed.
I used RealBasic and RealStudio for many years and still do. As you mentioned, it was impossible to use graphic objects in the IDE.
I did a small test in Xojo and found out that all issues in this respect seemed to be solved. Well, almost obviously…
I’ll repeat what Michel said: the Line control is not to be trusted. It will let you down at random, trust us. Also, it doesn’t have a DIRECTION property, so I’m not sure what you meant.