SDK:Creating Dialogs

From Vectorworks Developer
Jump to navigation Jump to search

.SDK|SDK ..SDK:Types|SDK Types ..SDK:Using the SDK|Using the SDK ..VCOM:VCOM (Vectorworks Component Object Model)|VCOM Basics ..VCOM:Class Reference|VCOM Class Reference

Create Dialogs

To create a Layout Manager dialog write a VectorScript routine that: 1) creates the layout and the controls; 2) arranges the controls inside the layout; 3) adds any special alignments.

The first step is to create a Layout, which is equivalent to a dialog and serves as the overall container. Next, create the individual controls and give each control a unique ID number between 3 and 400. ID’s 1 and 2 are reserved for the OK and Cancel button. Some controls require a size that is specified in character units, which is based on the average size of a character in the current dialog font.

After creating the control, set the help text for individual controls using SetHelpString.

The Layout Manager supports several types of user interface items (sometimes referred to as “controls” or “widgets”):

  • Checkbox
  • Combo Box (Popup menu)
  • Static Text
  • Editable Text
  • Multiline Editable Text
  • Help Description
  • List (Text only)
  • Real Number
  • Picture
  • Icon
  • Push Button
  • Radio Button
  • Slider Control
  • System Color Palette Button
  • Group Box
  • Tab Control
  • Swap Control
  • Checkbox Group Box
  • Radio Button Group Box
  • List Browser
  • Marker Attribute Button (Popup menu)
  • Line Style Button (Popup menu)
  • Line Weight Button (Popup menu)
  • Line Attribute Button (combined line style and line weight) (Popup menu)
  • Pattern attribute Button (Popup menu)