Position Locking a Line

I can use the IDE Library to drag an Oval, Rectangle etc. onto my window. I am given options to lock these items in various ways to the edges of the window,

However, when I drag in a line, I am not given the option. I sense there is some obvious reason for this but I do not understand. I want to create a vertical line that is locked to the right side of the window.

Line has always been an odd control and in my experience, has never worked quite right. You may be better off drawing the line yourself in the window paint event.

Well, I ended up drawing a very narrow rectangle which was “good enough” for my needs (App for my own use)

Actually, if you are trying to draw horizontal or vertical lines, the rectangle produces very nice lines. You can specify different colors or shades for the top/left vs bottom/right edges. You can adjust the size of the rectangle so that you can also see the interior color which can be assigned a third color. And you can adjust border thickness. With all this control, you can make quite “pretty” lines.

IIRC it was much better behaved control before they dogfooded the IDE back in Realbasic 5.5 and earlier… After that it’s been a pain to use. Since then when I need a Line I do draw it myself.

-Karen

in fact the lines are difficult to select once they are vertical or horizontal. very difficult you can’t clic them.
but if you select it from the left navigator, or by dragging a rectangle around the line, then you can select the line and lock or unlock them.
xojo 2019r11