Line color

Hi all,

I can’t set the (foreground) color property of a vertical / horizontal line.
They just stay black even when I use a method.
No problems with the free line.
Is this a bug?

XP / 2.2.rc7

Ron,

You can’t set line properties programatically.

Also a horizontal line (if you chose it from the draw menu) is really a rectangle with a “SpecialMatte” applied to it (top line width = 1, top line color = black). You can edit it by clicking on it, and then modifying the “border” property.

You can use a label object with a bunch of underscore characters if you want programmatic control. Set to a specific font – don’t leave on default.

I always use a label and just set its border properties using a style (no underscores necessary). Just create a style class like

label.some_label
{
	border-style: solid;
	border-width: 1px 0px 0px 0px;
}

and apply that to an empty label. With the example you get a 1px horizontal line. I wouldn’t use rectangles or anything like that. Maybe they disappear one day, since all they actually are is labels…

The same drawback applies to styles that the “line” object has: you can’t change the line color programmatically. Which leaves you with only the fgcolor property of labels to work with (which changes the color of the text in a label).