dia-installer.de / Documentation / Manual

Chapter 7. Selecting Objects

7.1. Selection Introduction

Selecting one or more objects is a very common task when using Dia. Whenever you wish to move, copy, delete, or edit an object or change it's properties, you must first select it. You can also work with a set of selected objects -- for example, to move a group of related objects while keeping their relative positions in tact or to change the properties of a group of objects.

Selecting objects can be done in several ways, including clicking with the mouse, selecting by area, or using the Select menu to perform additional selection options.

7.2. How To Select Objects

7.2.1. Selecting a Single Object

To select a single object, just click it with the mouse. Also, when an object is first placed on the canvas, it is automatically selected.

Once an object is selected, its handles are illuminated. For shapes, the handles are green points on its corners and sides. For a line, the handles are green or red at the ends, and orange in the middle. Once the object is selected, you may work with it as desired. To access the object's properties, you can double-click it or right-click and select Properties from the pop-up menu.

Selected Object

Figure 7.1. Selected Object

7.2.2. Deselecting Objects

You can deselect one or more selected objects by double-clicking on any empty space on the canvas or by selecting any other object. The handles will diObjects / Align Optionssappear, indicating that the object is no longer selected. Selecting the Layers option from the Diagram menu will also deselect all selected objects.

7.2.3. Selecting Multiple Objects

Multiple selection is useful when you want to apply the same operation to two or more objects. When selected, you may work with these objects as a set or individually. See the section Working With Selected Objects for more information.

Dia provides a number of ways to select multiple objects. These are outlined below. Note that either double-clicking on an empty region of the canvas or single-clicking on an unselected object deselects all selected objects. Shift+Click Selection

A simple way to select two or more objects is to hold the Shift key down while clicking the objects with the mouse. The Shift+Click acts as a toggle. If you Shift+Click once, the object is selected. Shift+Click a second time to deselect the object.


You can combine Shift+Click with any of the other methods outlined below to either select an additional object or deselect a selected object.


When you have a set of objects selected, it is still possible to resize or change the properties of one object without affected the other selected objects. See the section Working With Selected Objects for more information. Select By Area

You can select all of the objects within a rectangular region of the screen by placing the mouse pointer to the upper left of the top-left object in the set and then dragging the mouse to a point below and to the right of the lower-right object in the set. A thin dashed rectangle will be drawn on the canvas as shown in the screenshot below. All objects that COMPLETELY FIT inside this rectangle are selected. Objects that are only partly inside the rectangle are not selected.

Select By Area Example

Only objects entirely inside rectangle are selected.

Figure 7.2. Select By Area Example


You can select multiple regions using select by area. Objects previously selected will continue to be selected as long as you don't deselect all (e.g., by double-clicking on an empty region of the canvas or by clicking on an unselected object without using the Shift key). As noted above, you can also use Shift+Click to select or deselect an individual object at any time.


Normally, selecting from top-left to bottom-right is the same as a "reverse drag" -- starting on the bottom-right and dragging toward the top-left. However, you can set an option in Dia that allows you to select objects that are only partially contained in the selection rectangle when you "reverse drag". See User Interface / Reverse Dragging for more information. Select All

The Select menu shown below has six options for selecting multiple objects. The first option is All.

Select Menu

Figure 7.3. Select Menu

You can select all objects on the canvas using the Select->All option or by pressing Ctrl+A. This selects all objects whether they are visible or not.


As with any of the selection methods, if you are using layers, only objects in the current layer will be selected. See Managing Layers for more information on working with layers. Select None

Select->None option will deselect all objects. It has the same effect as double-clicking on a blank region of the canvas. Select Invert

This option allows you to select all objects except for those currently selected. Say, for example, that you have 20 objects and wish to select all but two of them. You can do this by (1) selecting the two objects to be excluded and then (2) using the Select->Invert menu (or Ctrl+I). This will deselect the two currently-selected objects and select the 18 unselected objects.


Another way to do this is to Select->All (or Ctrl+A) and then use Shift+Click to deselect the objects you don't need. Select Transitive

Objects in Dia can be connected using lines. The Select Transitive and Select Connected options allow you to select objects based on how they are connected.

The Select Transitive option selects ALL objects connected directly or indirectly to the currently selected objects, no matter how many levels deep the connection might be. To use this, select one or more objects and then choose Select->Transitive. All objects connected to the initially selected objects will be added to the selected set. Select Connected

This option is similar to Select Transitive except that it only adds objects that are immediately connected to an already-selected object. To use this option, first select one or more objects. Then choose Select->Connected. Any objects that are directly connected to the currently selected objects will be added to the selected set.


The Select Connected option only goes out one level. For example, if box A is connected by a line to box B, and box A is selected, Select->Connected will only select the line, not box B. If you do Select->Connected a second time, then box B will also be connected.

You can use Select->Transitive to select all objects connected to the currently selected objects in one operation. Select Same Type

This option allows you to select all objects that are the same type of object as one already selected. To use this option, select one or more objects and then choose the Select->Same Type option. All objects that are the same type as one of the previously selected objects will be added to the set of selected objects.

For example, if you want to select all of the Line objects on your diagram, select one Line object and then use Select->Same Type to select all other lines.


The menu choice Select->Same Type can be combined with the menu choice Objects->Group to quickly change one or more properties of all objects of one type on your diagram. See Changing Properties for a Group of Objects for more information.


The object type must match exactly. For example, a Line object and a Zigzagline object are different types.

7.3. Working With Selected Objects

Once you have a set of selected objects, there are several things you may do with them.

7.3.1. Operations on All Selected Objects

The following operations can be done on all selected objects as a set. Move Selected Objects

You can move selected objects as a group, without changing their relative positions. To do this, place the mouse pointer inside a shape or on a blank spot on a line that is part of the selected set and then drag to the desired new location. Copy, Cut, Paste, Duplicate, Delete

You can perform any of the normal edit operations on a set of selected objects, just as you would for a single object, using either the shortcut key or the Edit menu. For example, to Duplicate a set of selected objects, select Edit / Duplicate or press Ctrl+D. A copy of the entire set of objects will be created on your canvas, just below and to the left of the original objects. Note that when you Duplicate or Paste a set of objects, after the operation only the newly-created objects are selected. Working With Individual Objects

Due to limitations in the implementation some operations on single objects in a selection were still only modifying the single object. Since dia 0.97 these inconsistency got resolved so the properties dialog allows to change multiple objects properties at once - without first grouping them.

Also the single objects handles change behaviour in a selection (shown by slightly dimming them). Instead of resizing the single object they can just be used to move the whole selection an align it on the grid, see snap to grid for details.


When pulling up the properties dialog, be sure not to double-click on the blank canvas or all of the objects will be deselected. Creating an Object Group

As noted above, it is easy to create and remove sets of selected objects, and a selection can be removed accidentally by double-clicking on a blank area of the canvas. If you wish to keep a set of selected objects as a permanent group so that you will not accidentally deselect them, you can create an object group. Just select Objects->Group to create the group. You can select Objects->Ungroup to remove the group. See Grouping Objects for more information on groups.

dia-installer.de / Documentation / Manual

Imprint | Privacy Policy