Skip to content

Class Palette - Context Menu

The Class Palette supports various operations through its Context Menu:

Class Palette Modes

The class palette operates in two modes:

  • Normal Mode: Classes in the palette can be dragged and dropped into the visual designer.
  • Rearrange Palette Mode: Selected via the context menu, this mode is used to rearrange the groups and classes within the palette.

When in rearrange mode, you can move groups and classes inside the palette via drag and drop, making it easy to customize the order of your class palette. When you are finished reordering, select this context menu option again to exit this mode.

Note: While customizing the arrangement of classes in your workspace, the Class Palette will switch to displaying the unfiltered full set of classes until you exit the “Rearrange Palette Mode”.

Context Menu Options

Sort Classes Within All Groups

This option reorders the classes within all groups in alphabetical order. It does not reorder the groups themselves.

Hide Classes Defined in the System Class List

This option hides all classes that are defined in the system class. Selecting this will show only non-system classes – the classes defined in libraries and in the workspace. You would probably only want to use this option if you have created subclasses for all system classes.

Add Existing Class to Palette

This option is used to add an existing class to the class palette. This will invoke the “Add a new class to the class palette” dialog, allowing you to select the class to be added to the palette.

The new class will be added to the group from which this option was selected and will be placed at the end of the group. You can use the Rearrange Palette Mode to move this class where you wish.

Duplicate Class in Palette

This option is used to make a duplicate class entry. The entry will be placed at the end of the group, and you can use the Rearrange Palette Mode to move this class where you wish. This can be used to create new groups of classes (e.g., Favorites) that contain classes already defined elsewhere in the class palette.

Create/Load Class DFO File

This loads the class’s object preference file (DFO file). This file contains code that is created any time this object is instantiated. You may load this file and customize it according to your needs.

Note: The DFO files for system classes cannot be directly modified within a workspace. If you attempt to load a system DFO file, you will be informed that this is a system class and given the opportunity to create a copy of this DFO file in your current workspace, where it can be edited. Changes will only apply to the one workspace and not to other workspaces using the system class. However, if the workspace is a library and the change is made within the library’s workspace, all workspaces using this library will also use the modified DFO file.

Show Class Palette Item Properties

This option invokes the "Class Palette Item Properties" dialog, showing information about this class entry – package file, class name, group name, and icon name.

Create New Group

This option allows you to create a new group. A dialog will be invoked asking you to enter a new group name. After creating the group, you can use the Rearrange Palette Mode to move this group where you wish and populate it as needed.

For example, you may wish to create a new group named “Favorites” and place this at the top of your class palette. You could then create duplicates of your most commonly used classes and place them in this group. Since the first group is by default always opened, you will always have quick access to your most commonly used controls.

Remove Class from Palette

This option removes the selected class from your class palette. This does not delete the class – it only removes it from the class palette. Once removed, you can always add the class again.

You will be asked to confirm the class removal before the class is actually removed.

Remove Group

This option removes the selected group and all of the classes within this group from your class palette. This does not delete any of the classes – it only removes them from the class palette along with the group. Once removed, you can always add the group and classes again. Adding these back could be a tedious process, so you are encouraged to use this feature carefully.

Before a group is removed, you will be shown a list of all the classes that will be removed and asked to confirm this action.

Maintain Libraries

This option invokes the “Library Maintenance” dialog. This is used to determine which libraries will be used by the workspace. This dialog allows you to add or remove a library.

Note: A library is just a workspace that has been designed to be used as a library. Like any workspace, a library contains a class list and is maintained the same way all workspace class lists are maintained. When a library is added to a workspace, all classes defined in the library class list will be added to the workspace’s class list. The initial grouping and ordering of these new classes is determined by the library’s class list.

When a library is removed from a workspace, all classes defined by that library will be removed from the workspace’s class list.

In addition to responding to additions and removals of entire libraries, any changes in an existing library (i.e., adding a new class or removing a class in that library) will also be reflected in any workspace that uses the library.

Rebuild All Libraries

This rebuilds the class list, ensuring that all classes defined in the system class list and all classes defined in library class lists are placed in the current class list. It does this by removing all system and library classes from the current class list and then importing all of the classes defined in the system and library class lists.

Note: This only operates on system and library classes. It does not add or remove any classes that were added directly by the workspace. In other words, any class added to the class palette as part of the Add Class to Palette operation or any classes created as part of the Create New Class operation (Add a Class, Multi-Classes, Client, Web Service classes, COM classes) will not be changed.

This essentially restores the class palette’s list of system and library classes and may be useful if your class list needs to be “started over”.

Refresh/Test Class List

This option performs the same operation that occurs every time a workspace is loaded. The Studio will first check to see if the workspace’s class list is up to date. If classes were added or removed in the system class or a library class, the workspace class list will be updated with this change. This is referred to as class list reconciliation. If there are any reconciliation changes, these will be reported in the output panel.

This process also checks that all of the classes in the list are valid by verifying that each class can be found in the file associated with the class. Any errors will be reported in the output panel.

If class list errors are listed in the output panel, either as part of loading a workspace or as a result of this operation, you will want to fix these errors. After fixing the errors, you can again select “Refresh Class List” to confirm that the errors no longer exist.

Class Help

This option opens the help system for DataFlex classes and jumps to the Class Reference for the selected class.

See Also