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

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

image

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

image

 

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.

image

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

image

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

image

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

image

And you'll see a Geometry section

image

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.

image

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

image

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.

image

 

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

SNAGHTMLa730718

Now you will see two Geometry sections.

image

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"

image

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

image

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):
Post:
 
Some HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>