Tropicalrambler
Tropicalrambler

Reputation: 707

Change style of individual borders of a rectangle in draw.io

I want to format a rectangle in draw.io, such that only one border (left border) is colored black, the other borders: top, right and bottom must remain "clear".

I am trying to figure out proper coding to affect only those elements, but it seems that you can affect only the entire border with the style key: imageBorder=none as explained in Change the style of shapes for draw.io.

Is there a way to only have one border with a specific color, and the other borders blank? Code for such a trick would be very welcome.

Upvotes: 7

Views: 26850

Answers (1)

user11967801
user11967801

Reputation: 146

When you type "rectangle" in the Search bar, you will see "Partial rectangle" which sounds like the one you are looking for. Also, there is a possibility to change some properties in the Format panel on the right when a shape is selected.

You can also add the following style:

verticalLabelPosition=bottom;
verticalAlign=top;
html=1;
shape=mxgraph.basic.rect;
fillColor=#ffffff;
fillColor2=none;
strokeColor=#000000;
strokeWidth=1;
size=20;
indent=5;

in the Edit style window, and then play with the extended list of properties in the Format panel.

Upvotes: 13

Related Questions