Visual Designer Context Menu

Pressing the right mouse button in the Visual Designer will invoke its context menu. Depending on which object and how many objects are selected the following options will appear. In general, there are two types of context menus: one for single selected objects and one for multiple selected objects.

Switch to Editor

This causes the designer to switch to the Code Editor. The source code will display the object currently selected in the designer. This can also be accomplished by pressing the F7 key or by double clicking on the object.

Locate

This causes the Code Editor to position itself at the source code representing the selected object but it does not give the editor the focus. This option is useful if you are viewing the editor view and the designer view side-by-side. If not already open, this opens a separate editor view rather than switching from the visual designer to the editor view in the current window, as F7 does.

This option is only available when a single object is selected.

Object Properties

This opens if the Object Properties panel, if it is not already open and gives it the focus. The properties for the currently selected object will be shown.

This option is only available when a single object is selected.

Drag Lock

This toggles the Drag Lock feature for the entire file.

Cut

This cuts all selected objects and moves them to the clipboard. This can also be accomplished by pressing the Ctrl-X key

Copy

This copies all selected objects to the clipboard. This can also be accomplished by pressing the Ctrl-C key

Paste

This pastes the contents of the clipboard into the Designer View. This can also be accomplished by pressing the Ctrl-V key

The paste will only occur of the pasted contents are properly formatted  (i.e., they are objects). The objects will be pasted inside of the currently selected object.

This option is only available when a single object is selected.

Delete

This deletes all selected objects. This can also be accomplished by pressing the Del key

Center

This centers the selected object within its container.  You will be prompted to center the object horizontally or vertically.

This option is only available when a single object is selected.

Anchors

Sets the peAnchors property of the selected object(s). The object(s) current peAnchor setting is shown as the "checked" item in the list of anchor settings.

Size to Container

Sets the Size & Location properties of the selected object so that it occupies all available space within its container object. If the object is not currently "anchored" to its container, then the peAnchors property is also set to anAll. This means that if the container is resized then the object continues to occupy all available space.

Arrange Objects

This option loads the Arrange Objects panel which can be used to size and locate groups of objects.

Class Help

This loads class reference help for the currently selected class (or if multiple objects are selected, the first selected object). This can also be accomplished by pressing the F1 key.

Designer Help

This loads the Studio Help for the Visual Designer. This can also be accomplished by pressing the Ctrl+F1 key.

Add Component to Project

This option will attempt to add the current file to the current project. If the file/component is already part of this project, this option is disabled.

This option may not succeed. The Studio may determine that the component cannot be added to the project. If so an error will be displayed, explaining the problem.

Test View/Report in Project

If the current file is a view or report view component then this option will perform the following:

  1. Load the special test project (you must have created or assigned a special test project first).

  2. Remove any view or reports from this test project.

  3. Add the current view (or report view) to the test project

  4. Compile the test project.

  5. Run the test project.

 

See Also: Select Test View Project, Enhanced Component Testing.

 

ActiveX Properties

This invokes an ActiveX control’s property panel. This is different than Object Properties Panel and is unique for each ActiveX control.

This option is only available when an ActiveX object is selected.

Append Tab Page

This adds a new tab page to the selected tab dialog. The new page is added as the last tab page.

This option is only available when a single tab dialog object is selected.

Insert Tab Page

This inserts a new tab page into the selected tab dialog. The page is inserted before the current tab page.

This option is only available when a single tab dialog object is selected.

Delete Tab Page

This deletes the current tab page from the selected tab dialog.

This option is only available when a single tab dialog object is selected.

Background Resolution Grid

This allows you to show or not show the Background Resolution Grid.

This option is only available if you invoke the context menu from the designer view’s “client area” – the white outer area of the designer view.

Use Legacy Windows Fonts

This option allows you to preview how the view you are designing would look if your application was run using DataFlex's legacy font setting.

This is only a preview and does not actually change the way that your application would look when it is compiled and run.

To permanently set your application's legacy font setting, set the pbUseWindowsFont property of the cApplication object, to False.

For more information, see Understanding Fonts in DataFlex.

Close

This closes the designer view.

This option is only available if you invoke the context menu from the designer view’s “client area” – the white outer area of the designer view.

Align

This option allows you to align multiple selected objects. You will be presented with a sub-menu option allowing you to align all objects to the left, top, right, bottom, top-to-bottom and left-to-right.

Objects are all aligned relative to the first object selected.

This option is only available if you have multiple selected objects.

Align within Container

This option allows you to align multiple relative to their container. You will be presented with a sub-menu option of two options:

 

The objects are arranged in the order that they are selected.

This option is only available if you have multiple selected objects.

Make Same

This option allows you to make multiple selected objects the same height, width of size (both size and width).

Objects are sized based on the size of the first object selected.

This option is only available if you have multiple selected objects.

 

Add Standard Menu/Toolbars

If you are editing a main project.src file that does not contain a commandbar system object then this option can be used to add a 'standard' set of commandbar objects including File, View, Report menus etc, Find, Edit toolbars and a status bar.

The command bar system object that is created is based on the cCJCommandBarSystem class by default. This can be configured for the current workspace in the Configure Workspaces - Class Preferences dialog.

This is a fast and convenient way to add a new commandbar system to an existing project.

 

See Also

The Visual Designer

Selecting Objects

Dragging, Dropping and Resizing Objects

Menus, Toolbars & Statusbars

Object Properties

Locking Objects

Arrange Objects

The Background Resolution Grid

The Code Editor