« Interlude: "Partitura 001" by Abstract Birds | Main | Plotting with a Sharpie Permanent Marker and the PhlatPrinter 3 »

Visio: Rectangles with Lines on One Side

This technique is useful when you need to draw forms or reports where you need areas to be defined not by borders on all sides but only on – for example – the bottom. Below are some examples of diagrams where you can use this technique.

In the image below, we can use such shapes for filling in fields


In the next image, you might use such a shape to define the column headers in a table. This is in fact my original motivation for constructing this shape: I needed to mock-up several SSRS reports in Visio and had no easy way to draw the column headers



Prefer to Watch?

Of course, I have a screencast available: http://vimeo.com/23377173



Step-by-Step Instructions

Let' start with a basic rectangle that has a fill color and a line.


What we want is shown below – a line on the rectangle, but only on the bottom side.


Our initial attempt at creating such a shape may be to draw two shapes – a rectangle and a line – and group them together.


But this has some disadvantages:

  • Generally Visio does not handle grouped shapes as fast as a single shape
  • If you format the line format of the grouped shape, the change will affect both the plain rectangle and the line


There's a better way to construct this shape so that it works for all intents and purposes like a normal rectangle. As you may have guessed, it's ShapeSheet time.

First bring up the ShapeSheet


And you'll see a Geometry section


A cursory look at this, should make it clear what is drawn by the rows in this section: a simple rectangle.

Our first step is to set the Geometry1.NoLine to TRUE. This will cause the fill of the shape to be rendered but there will be no line shown.


This is what the shape will look like now. No matter how we set the line formatting – no line will appear.


Now let's add a line that covers only the bottom part of the rectangle. We will do this by adding another Geometry section. This technique (multiple Geometry sections) has always been possible in Visio, but is not so widely known if you haven't spent a lot of time making complex shapes.

Anywhere in the ShapeSheet window, simply right-click and select Insert Section.



The Insert Section dialog will appear. Select Geometry and click OK.


Now you will see two Geometry sections.


Notice that the second section already has the NoFill property set to TRUE – which is what we want.

All we will need to do now is to change the second row – the LineTo row – to have an X value of "Width*1"


And we are done. We have a shape with a fill but only a partial border.


From the instructions above, it should be clear how to handle the other three sides.

PrintView Printer Friendly Version

EmailEmail Article to Friend

Reader Comments

There are no comments for this journal entry. To create a new comment, use the form below.

PostPost a New Comment

Enter your information below to add a new comment.
Author Email (optional):
Author URL (optional):
Some HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>