The tool panes on the left hand side of the control.

Usage

Set_Property(OLECtrlEntID, "OLE.Panes", Array)

Values

Array is a multivalued dynamic array with the following structure:

PosNameTypeDescription
<0, 1>TypeTextThe type of pane
<0, 2>CaptionTextThe pane's title bar caption
<0, 3>Font Change FlagBooleanEnables font changing for Label panes
<0, 4>FontFontDefault font for Label panes

Remarks

The Panes property initializes the panes on the left side of the control. By default, there is always at least one pane called the General pane, and it can never be removed. Therefore, it is not included in this property. It's best to think of this property as "all the other panes."

Adding panes is as easy as setting this property to an @FM delimited array, which each field representing one pane. Each field has several values describing the pane. The Type value establishes what kind of pane is being added. The Caption value sets that pane's caption, which appears within a title bar at the top of each pane. The Font Change Flag and Font values are specific only to label panes, which are described in further detail below.

Panes do more than add pretty user interface panels. They define convenient tools for the end user. There are currently three types of panes you can add: Labels, Icons, and Predrawn Objects.

Labels

To add a pane of labels, then include a field whose Type value is set to "Labels". This will create an empty pane to which labels can be added. These labels become available to the end user for quick labelling of diagrams. While users can accomplish labelling with the text annotation tool (located on the General pane and toolbar), it is far faster to click & drop predefined labels.

The Font Change Flag value can be used to enable or disable a special hyperlink that will appear near the top of the pane. When clicked, the hyperlink prompts the user to alter the font for all labels within the pane. If you want to save the user's changes, you'll need to get this property and store the font in the database for use later. Set this value to 0 if you don't want the user to change the font.

The Font value is where you set the default font for all labels. If the user is allowed to change the font, you can read this value later to remember it, if you so desire.

Once the labels pane is created, use the Labels property to add the pane's labels.

Icons

An icon pane can be added by setting the Type value to Icons. Like labels, the icons provide a way to efficiently drop small images meaningful to the diagram. Icon panes are empty when set with this property, so use the Icons property to add items to it.

Predrawn Objects

Setting the Type value to "Predrawn Objects" creates a special pane. First, you can only add exactly one of these panes. Any attempt to add more will be ignored. Once this pane is added, a special feature of the control is activated which allows users to select any number of objects and save them as a single object for reuse.

This pane is populate using the PredrawnObjects property, but you'll never set this using human readable values. Instead, you'll want to read this property when the form containing your SRP Sketch Control is closed so you can save the objects. The next time the sketch is used, you'll read your previously saved objects and pass them to the PredrawnObjects property to restore the user's predefined objects.

Example

// Add two label panes, an icon pane, and a predrawn objects pane
Panes = ""
Panes<-1> = "Labels"          :@VM:"Codes"           :@VM:1
Panes<-1> = "Labels"          :@VM:"Labels"          :@VM:0:@VM:"Consolas":@SVM:@SVM:700
Panes<-1> = "Icons"           :@VM:"Icons"
Panes<-1> = "Predrawn Objects":@VM:"Predrawn Objects"
Set_Property(@Window:".OLE_SKETCH", "OLE.Panes", Panes)

See Also

LabelsIconsPredrawnObjects

  • No labels