AddListBoxTabStop Dialogs - Modern 

Declaration:

PROCEDURE   AddListBoxTabStop
(   dialogID :LONGINT;
    itemID :LONGINT;
    tabStop :INTEGER
) ;

Description:

Adds a tab stop to a Layout Manager list box. The last parameter is the tab stop, in characters. This function should be called in the dialog handler, as opposed to the dialog definition procedure. This function will clear all data in the list control.

Parameters:

dialogID ID of the dialog
itemID ID of the list box
tabStop The tab stop, in characters

See Also:

RemoveListBoxTabStop  



  AdjustComponentPixelPos Dialogs - Modern 

Declaration:

FUNCTION   AdjustComponentPixelPos
(   nDialogID :LONGINT;
    nComponentID :LONGINT;
    nHorizontalPixels :INTEGER;
    nVerticalPixels :INTEGER
) :BOOLEAN ;

Description:

Adjust the pixel width and height of the specified Layout Manager component.



  AlignItemEdge Dialogs - Modern 

Declaration:

PROCEDURE   AlignItemEdge
(   dialogID :LONGINT;
    itemID :LONGINT;
    whichEdge :LONGINT;
    alignID :INTEGER;
    alignMode :INTEGER
) ;

Description:

Aligns the specified control item with other items having the same edge and alignment id values. To align several control items, call this function once for each item to be aligned using a common alignment id value.

Table - Alignment Options

Index
Alignment Edge
1
Right
2
Bottom
3
Left
   
Index
Alignment Mode
0
Resize control items
1
Shift control items


Right alignment of objects will use the object with the minimum pixel value as the alignment baseline. Bottom and left alignment of objects will use the object with the maximum pixel value as the alignment baseline.

Parameters:

dialogID The index of the dialog layout being defined.
itemID The index of the control item to be aligned.
whichEdge The control edge to be aligned.
alignID An arbitrary number used to identify the items to be aligned together.
alignMode Alignment mode of the operation

Example:

{aligns all items with the positioning ID of 99}
	AlignItemEdge(lEditID,4,1,99,0);
	AlignItemEdge(lEditID,6,1,99,0);



  ClearGradientSliderSegments Dialogs - Modern 

Declaration:

PROCEDURE   ClearGradientSliderSegments
(   dialogID :LONGINT;
    componentID :LONGINT
) ;

Description:

Removes all segments (except for 2) from the gradient slider.

Note: a gradient slider must always have at least 2 segments.

Parameters:

dialogID Index to the dialog layout that contains the gradient slider component.
componentID Index to a specific gradient slider component.

Example:

ClearGradientSliderSegments(dialogID, componentID);



  CreateCenteredStaticText Dialogs - Modern 

Declaration:

PROCEDURE   CreateCenteredStaticText
(   dialogID :LONGINT;
    controlID :LONGINT;
    text :STRING;
    widthInCharacters :INTEGER
) ;

Description:

Similar to CreateStaticText, but creates static text that is centered in its control field on the dialog.



  CreateCheckBox Dialogs - Modern 

Declaration:

PROCEDURE   CreateCheckBox
(   dialogID :LONGINT;
    itemID :LONGINT;
    text :STRING
) ;

Description:

Creates a check box control in a dialog layout.

Parameters:

dialogID The index of the dialog layout containing the control.
itemID The index that will identify the control item.
text The display text for the control.

Example:

PROCEDURE Example;
VAR
	dialog1 :INTEGER;
	result  :INTEGER;
PROCEDURE Dialog_Handler(VAR item :LONGINT; data :LONGINT);
BEGIN
END;
BEGIN
	dialog1 := CreateLayout('Example Dialog', FALSE, 'OK', 'Cancel');
	CreateCheckBox(dialog1, 4, 'Use layer colors');
	SetFirstLayoutItem(dialog1, 4);
	result := RunLayoutDialog(dialog1, Dialog_Handler);
END;
RUN(Example);

See Also:

SetItem   SetItemEnable   ItemSel  



  CreateCheckBoxGroupBox Dialogs - Modern 

Declaration:

PROCEDURE   CreateCheckBoxGroupBox
(   dialogID :LONGINT;
    itemID :LONGINT;
    name :STRING;
    hasFrame :BOOLEAN
) ;

Description:

Creates a checkbox group box. The checkbox will have name as its label. If hasFrame is true, the group will have a box drawn around it like a regular group box.

Parameters:

dialogID ID of the dialog
itemID ID of the checkbox group box
name Title that appears in the checkbox group box
hasFrame True if the group box has a frame around it; false otherwise



  CreateClassPullDownMenu Dialogs - Modern 

Declaration:

PROCEDURE   CreateClassPullDownMenu
(   nDialogID :LONGINT;
    nComponentID :LONGINT;
    nWidthInChars :INTEGER
) ;

Description:

Creates a Layout Manager class pull down menu control.

Example:

PROCEDURE Example;
VAR
   dialog1 :INTEGER;
   result  :INTEGER;
PROCEDURE Dialog_Handler(VAR item :LONGINT; data :LONGINT);
BEGIN
END;
BEGIN
   dialog1 := CreateLayout('Example Dialog', FALSE, 'OK', 'Cancel');
   CreateClassPullDownMenu(dialog1, 4, 24);
   SetFirstLayoutItem(dialog1, 4);
   result := RunLayoutDialog(dialog1, Dialog_Handler);
END;
RUN(Example);

See Also:

CreateImageControl  



  CreateColorPopup Dialogs - Modern 

Declaration:

PROCEDURE   CreateColorPopup
(   dialogID :LONGINT;
    itemID :LONGINT;
    widthInCharacters :LONGINT
) ;

Description:

Create a color popup dialog control that displays the 256 color palette associated with the active document.

The widthInCharacters argument specifies the width of the control. Pass -1 to request the default size, which will be consistent with other attribute controls (currently defaults to 14). This argument allows for special circumstances like a small popup for the Fore and Back color associated with the Pattern attribute control.

Example:

PROCEDURE Example;
VAR
   dialog1 :INTEGER;
   result  :INTEGER;
PROCEDURE Dialog_Handler(VAR item :LONGINT; data :LONGINT);
BEGIN
   CASE item OF
      SetupDialogC:
         BEGIN
            SetColorChoice(dialog1, 4, 1242);
         END;
      1:
         BEGIN
            GetColorChoice(dialog1, 4, result);
            AlrtDialog(Concat('color index: ', result));
         END;
   END;
END;
BEGIN
   dialog1 := CreateLayout('Example Dialog', FALSE, 'OK', 'Cancel');
   CreateColorPopup(dialog1, 4, 24);
   SetFirstLayoutItem(dialog1, 4);
   result := RunLayoutDialog(dialog1, Dialog_Handler);
END;
RUN(Example);



  CreateControl Dialogs - Modern 

Declaration:

PROCEDURE   CreateControl
(   dialogID :LONGINT;
    itemID :LONGINT;
    controlKind :LONGINT;
    name :STRING;
    data :LONGINT
) ;

Description:

Creates a new extended dialog control item. Supported extended dialog controls include image, system color palette, and slider controls.

Table - Control Types

Index
Control Type
1
Image
2
System Color
3
Slider
10
Image Popup
11
Gradient Slider

Parameters:

dialogID The index of the dialog layout containing the control.
itemID The index that will identify the control item.
controlKind The type of control item.
name The display text of the control item.
data Initial data for the control item.

Example:

{open the resource file containing the graphics for the dialog}
rsAvailable:= SetVSResourceFile('Images');
{creates a new image control}
 CreateControl(lEditID,5,1,'SplashImage',1010);

{Slider Control Example}
PROCEDURE dialog1_Main;
CONST
	kSlider = 4;
	kLabel  = 5;
	kValue  = 6;
VAR
	dialog1   :INTEGER;
	gSlider   :LONGINT;

PROCEDURE dialog1_Handler(VAR item :LONGINT; data :LONGINT);
BEGIN
	CASE item OF
		kSlider:
			BEGIN
				GetControlData(dialog1, kSlider, gSlider);
				SetField(kValue, Concat(gSlider));
			END;
	END;
END;

BEGIN
	gSlider := 1000;
	dialog1 := CreateLayout('Slider Control', False, 'OK', 'Cancel');
	CreateControl     (dialog1, kSlider,  3, '', 1000);
	CreateStaticText  (dialog1, kLabel,   'Slider Value:', -1);
	CreateStaticText  (dialog1, kValue,   ' ', -1);
	SetFirstLayoutItem(dialog1, kSlider);
	SetBelowItem      (dialog1, kSlider,  kLabel,   0, 0);
	SetRightItem      (dialog1, kLabel,   kValue,   0, 0);
	IF RunLayoutDialog(dialog1, dialog1_Handler) = 1 THEN BEGIN
	END;
END;
RUN(dialog1_Main);



  CreateCustomControl Dialogs - Modern 

Declaration:

PROCEDURE   CreateCustomControl
(   dialogID :LONGINT;
    componentID :LONGINT;
    iWidth :INTEGER;
    iHeight :INTEGER
) ;

Description:

Creates a layout manager control in a VectorScript to be used in conjuction with GS_OverrideControl in an external dialog handler.



  CreateDesignLayerPullDownMenu Dialogs - Modern 

Declaration:

PROCEDURE   CreateDesignLayerPullDownMenu
(   nDialogID :LONGINT;
    nComponentID :LONGINT;
    nWidthInChars :INTEGER
) ;

Description:

Creates a Layout Manager design layer pull down menu control.



  CreateEditInteger Dialogs - Modern 

Declaration:

PROCEDURE   CreateEditInteger
(   dialogID :LONGINT;
    itemID :LONGINT;
    defaultValue :LONGINT;
    widthInCharacters :LONGINT
) ;

Description:

Creates an editable text field control for INTEGER and LONGINT values.

CreateEditInteger is intended specifically for entry of numeric values; the control returns values in a numeric format, and supports calculations within the control field.

Parameters:

dialogID The index of the dialog layout containing the control.
itemID The index that will identify the control item.
defaultValue Default value for the field.
widthInCharacters Width of the field in characters.

Example:

PROCEDURE Example;
VAR
	dialog1 :INTEGER;
	result  :INTEGER;
PROCEDURE Dialog_Handler(VAR item :LONGINT; data :LONGINT);
BEGIN
END;
BEGIN
	dialog1 := CreateLayout('Example Dialog', FALSE, 'OK', 'Cancel');
	CreateEditInteger(dialog1, 4, 123, 16);
	SetFirstLayoutItem(dialog1, 4);
	result := RunLayoutDialog(dialog1, Dialog_Handler);
END;
RUN(Example);



  CreateEditReal Dialogs - Modern 

Declaration:

PROCEDURE   CreateEditReal
(   dialogID :LONGINT;
    itemID :LONGINT;
    editRealType :LONGINT;
    defaultValue :REAL;
    widthInCharacters :LONGINT
) ;

Description:

Creates an editable text field control for REAL values.

CreateEditReal is intended specifically for entry of numeric values; the control returns values in a numeric format, and supports calculations within the control field.

Table - Field Types for EditReal Fields

Index
Field Value
1
REAL value
2
Angular value
3
Dimension
4
X coordinate
5
Y coordinate

Parameters:

dialogID The index of the dialog layout containing the control.
itemID The index that will identify the control item.
editRealType The type of REAL value being accepted.
defaultValue Default value for the field.
widthInCharacters Width of the field in characters.

Example:

PROCEDURE Example;
VAR
	dialog1 :INTEGER;
	result  :INTEGER;
PROCEDURE Dialog_Handler(VAR item :LONGINT; data :LONGINT);
BEGIN
END;
BEGIN
	dialog1 := CreateLayout('Example Dialog', FALSE, 'OK', 'Cancel');
	CreateEditReal(dialog1, 4, 3, 123, 16);
	SetFirstLayoutItem(dialog1, 4);
	result := RunLayoutDialog(dialog1, Dialog_Handler);
END;
RUN(Example);



  CreateEditText Dialogs - Modern 

Declaration:

PROCEDURE   CreateEditText
(   dialogID :LONGINT;
    itemID :LONGINT;
    defaultText :STRING;
    widthInCharacters :LONGINT
) ;

Description:

Creates an editable text field control in a dialog layout.

Parameters:

dialogID The index of the dialog layout containing the control.
itemID The index that will identify the control item.
defaultText The default display text for the control.
widthInCharacters The width of the displayed text in characters.

Example:

PROCEDURE Example;
VAR
	dialog1 :INTEGER;
	result  :INTEGER;
PROCEDURE Dialog_Handler(VAR item :LONGINT; data :LONGINT);
BEGIN
END;
BEGIN
	dialog1 := CreateLayout('Example Dialog', FALSE, 'OK', 'Cancel');
	CreateEditText(dialog1, 4, 'default text', 16);
	SetFirstLayoutItem(dialog1, 4);
	result := RunLayoutDialog(dialog1, Dialog_Handler);
END;
RUN(Example);




  CreateEditTextBox Dialogs - Modern 

Declaration:

PROCEDURE   CreateEditTextBox
(   dialogID :LONGINT;
    itemID :LONGINT;
    defaultText :STRING;
    widthInCharacters :LONGINT;
    heightInLines :LONGINT
) ;

Description:

Creates a scrolling multiline editable text field in a dialog layout.

Parameters:

dialogID The id of the dialog
itemID The id of the text box control.
defaultText The initial text.
widthInCharacters Width of the control in characters
heightInLines Height of the control in lines.

Example:

PROCEDURE Example;
VAR
	dialog1 :INTEGER;
	result  :INTEGER;
PROCEDURE Dialog_Handler(VAR item :LONGINT; data :LONGINT);
BEGIN
END;
BEGIN
	dialog1 := CreateLayout('Example Dialog', FALSE, 'OK', 'Cancel');
	CreateEditTextBox(dialog1, 4, 'default text', 24, 16);
	SetFirstLayoutItem(dialog1, 4);
	result := RunLayoutDialog(dialog1, Dialog_Handler);
END;
RUN(Example);



  CreateEnhancedPullDownMenu Dialogs - Modern 

Declaration:

PROCEDURE   CreateEnhancedPullDownMenu
(   dialogID :LONGINT;
    componentID :LONGINT;
    iWidthInCharacters :INTEGER;
    bShowIconInMainWindow :BOOLEAN
) ;

Description:

Creates a Layout Manager enhanced pull down menu control.



  CreateGradient Dialogs - Modern 

Declaration:

FUNCTION   CreateGradient
( name:STRING ) :HANDLE ;

Description:

Creates a new gradient resource.

Parameters:

name A user-specified name by which the newly created gradient will be identified.

Result:

Returns a handle to a new gradient resource if successful, otherwise the function returns nil.

Example:

gradientHandle := CreateGradient('My Gradient');



  CreateGroupBox Dialogs - Modern 

Declaration:

PROCEDURE   CreateGroupBox
(   dialogID :LONGINT;
    itemID :LONGINT;
    text :STRING;
    hasFrame :BOOLEAN
) ;

Description:

Creates a new group box control in a dialog layout.

The width of a group box is determined by the width of the longest control enclosed by the group box. The height of the group box is determined by the combined height of the enclosed controls.

While used primarily to contain and highlight related control items, group box controls can also be used to group controls for easier positioning. When used in this fashion, pass a blank string for the display text and set the frame display to FALSE.

Parameters:

dialogID The index of the dialog layout containing the control.
itemID The index that will identify the control item.
text The display text for the control.
hasFrame Displays a border for the group box.

Example:

{ creates a framed group box entitled "Options" }
	CreateGroupBox(lEditID,12,'Options',TRUE);

	CreateCheckBox(lEditID,13,'Use layer colors');
	CreateCheckBox(lEditID,14,'Create link on model layer');



  CreateIconPushButton Dialogs - Modern 

Declaration:

PROCEDURE   CreateIconPushButton
(   nDialogID :LONGINT;
    nComponentID :LONGINT;
    nIconID :INTEGER;
    nWidthInChars :INTEGER
) ;

Description:

Creates an icon push button with the specified icon ID and width in characters.

Parameters:

nIconID the index of the ICN# resource in the currently open rsrc file (or qtr on Windows)

Example:

PROCEDURE Example;
VAR
   dialog1 :INTEGER;
   result  :INTEGER;
   boo     :BOOLEAN;
 
PROCEDURE Dialog_Handler(VAR item :LONGINT; data :LONGINT);
BEGIN
END;
 
BEGIN
   boo := SetVSResourceFile('IP Resources');
   dialog1 := CreateLayout('Example Dialog', FALSE, 'OK', 'Cancel');
   CreateIconPushButton(dialog1, 4, 11021, 20);
   SetFirstLayoutItem(dialog1, 4);
   result := RunLayoutDialog(dialog1, Dialog_Handler);
END;
RUN(Example);



  CreateImageControl Dialogs - Modern 

Declaration:

PROCEDURE   CreateImageControl
(   dialogID :LONGINT;
    componentID :LONGINT;
    iWidthPixels :INTEGER;
    iHeightPixels :INTEGER;
    hImage :HANDLE
) ;

Description:

Creates a Layout Manager image control.



  CreateLayout Dialogs - Modern 

Declaration:

FUNCTION   CreateLayout
(   dialogTitle :STRING;
    hasHelp :BOOLEAN;
    defaultButtonName :STRING;
    cancelButtonName :STRING
) :LONGINT ;

Description:

Creates a new custom dialog layout. After the layout is created, control items for the dialog can be added to the layout.

Parameters:

dialogTitle Title of the dialog.
hasHelp Enables help text for the dialog.
defaultButtonName Text displayed in the default button of the dialog.
cancelButtonName Text displayed in the cancel button of the dialog.

Result:

Returns an index number identifying the new dialog layout.

Example:

{ creates a new dialog layout }
	lEditID := CreateLayout('Edit Layer',TRUE,'OK','Cancel');

	CreateGroupBox(lEditID,4,'',FALSE);
	CreateStaticText(lEditID,5,'Layer Name:',-1);
	CreateEditText(lEditID,6,'Layer-1',36);

	CreateGroupBox(lEditID,7,'Visibility',TRUE);
	CreateRadioButton(lEditID,8,'Visible');
	CreateRadioButton(lEditID,9,'Grayed');
	CreateRadioButton(lEditID,10,'Hidden');
	CreateStaticText( lEditID,11,'',6); 

	CreateGroupBox(lEditID,12,'Options',TRUE);
	CreateCheckBox(lEditID,13,'Use layer colors');
	CreateCheckBox(lEditID,14,'Create link on model layer');



  CreateLineAttributePopup Dialogs - Modern 

Declaration:

PROCEDURE   CreateLineAttributePopup
(   dialogID :LONGINT;
    itemID :LONGINT
) ;

Description:

Create a dialog control that displays both line style and line weight choices available in the current document.



  CreateLineStylePopup Dialogs - Modern 

Declaration:

PROCEDURE   CreateLineStylePopup
(   dialogID :LONGINT;
    itemID :LONGINT
) ;

Description:

Create a dialog control that displays the line style choices available in the active document.



  CreateLineWeightPopup Dialogs - Modern 

Declaration:

PROCEDURE   CreateLineWeightPopup
(   dialogID :LONGINT;
    itemID :LONGINT
) ;

Description:

Create a line weight popup dialog control to display list of line weights available in current document.



  CreateListBox Dialogs - Modern 

Declaration:

PROCEDURE   CreateListBox
(   dialogID :LONGINT;
    itemID :LONGINT;
    widthInCharacters :LONGINT;
    heightInCharacters :LONGINT
) ;

Description:

Creates a new list box control in a dialog layout.

Parameters:

dialogID The index of the dialog layout containing the control.
itemID The index that will identify the control item.
widthInCharacters The width of the control in characters.
heightInCharacters The height of the control in characters.

Example:

{ draws a list box 25 characters wide and 7 rows high }
CreateListBox(2,10,25,7);



  CreateListBoxN Dialogs - Modern 

Declaration:

PROCEDURE   CreateListBoxN
(   dialogID :LONGINT;
    itemID :LONGINT;
    widthInCharacters :LONGINT;
    heightInCharacters :LONGINT;
    isMultipleSelect :BOOLEAN
) ;

Description:

Creates a new list box control in a dialog layout. With isMultipleSelect true, the list supports multiple selection.

Parameters:

dialogID The index of the dialog layout containing the control.
itemID The index that will identify the control item.
widthInCharacters The width of the control in characters.
heightInCharacters The height of the control in characters.
isMultipleSelect Does the list support multiple selection

Example:

{ draws a muliple selection list box 25 characters wide and 7 rows high }
CreateListBoxN(2,10,25,7, true);



  CreateMarkerPopup Dialogs - Modern 

Declaration:

PROCEDURE   CreateMarkerPopup
(   dialogID :LONGINT;
    componentID :LONGINT
) ;

Description:

Creates a popup control that displays the various marker styles available in Vectorworks and allows the user to choose one. Markers are the adornments at the endpoints of line objects and consist of styles like arrow, circle, cross, etc.

Parameters:

dialogID Id of the dialog
componentID Id of the popup control

Example:

PROCEDURE Example;
VAR
	dialog1	:INTEGER;
	result	:INTEGER;

PROCEDURE Dialog_Handler(VAR item :LONGINT; data :LONGINT);
BEGIN
END;

BEGIN
	dialog1 := CreateLayout('Untitled Dialog', FALSE, 'OK', 'Cancel');
	CreateMarkerPopup(dialog1, 4);
	SetFirstLayoutItem(dialog1,  4);
	result := RunLayoutDialog(dialog1, Dialog_Handler);
END;
RUN(Example);



  CreatePatternPopup Dialogs - Modern 

Declaration:

PROCEDURE   CreatePatternPopup
(   dialogID :LONGINT;
    itemID :LONGINT
) ;

Description:

Create a pattern popup dialog control that displays all fill patterns available in current document.



  CreatePullDownMenu Dialogs - Modern 

Declaration:

PROCEDURE   CreatePullDownMenu
(   dialogID :LONGINT;
    itemID :LONGINT;
    widthInCharacters :LONGINT
) ;

Description:

Creates a new pulldown menu control in a dialog layout.

Parameters:

dialogID The index of the dialog layout containing the control.
itemID The index that will identify the control item.
widthInCharacters The width of the control in characters.

Example:

PROCEDURE dialog1_Main;
CONST
	kOK         = 1;
	kCancel     = 2;
	kClassPopUp = 4;
VAR
	dialog1        :INTEGER;
	gClassPopUpInt :INTEGER;
	gClassPopUpStr :STRING;
	cnt            :INTEGER;

PROCEDURE dialog1_Handler(VAR item :LONGINT; data :LONGINT);
BEGIN
	CASE item OF
		SetupDialogC:
			BEGIN
				FOR cnt := 1 TO ClassNum DO InsertChoice(kClassPopUp, NumChoices(kClassPopUp), ClassList(cnt));
			END;
		kOK:
			BEGIN
				GetSelChoice(kClassPopUp, 0, gClassPopUpInt, gClassPopUpStr);
			END;
	END;
END;

BEGIN
	dialog1 := CreateLayout('Untitled Dialog', TRUE, 'OK', 'Cancel');
	CreatePulldownMenu        (dialog1, kClassPopUp,  16);
	SetFirstLayoutItem(dialog1, kClassPopUp);

	SetHelpString(kOK,          'Accepts dialog data.');
	SetHelpString(kCancel,      'Cancels operation without changes.');
	SetHelpString(kClassPopUp,  'A pulldown menu control.');
	IF RunLayoutDialog(dialog1, dialog1_Handler) = 1 THEN BEGIN
		AlrtDialog(Concat('Class selected: ', gClassPopUpStr));
	END ELSE BEGIN
		AlrtDialog('User cancelled');
	END;
END;
RUN(dialog1_Main);



  CreatePullDownMenuGroupBox Dialogs - Modern 

Declaration:

PROCEDURE   CreatePullDownMenuGroupBox
(   liDialogID :LONGINT;
    liComponentID :LONGINT;
    iPullDownWidth :INTEGER;
    strLabel :STRING;
    bHasFrame :BOOLEAN
) ;

Description:

Creates a Layout Manager pull down menu group box.



  CreatePushButton Dialogs - Modern 

Declaration:

PROCEDURE   CreatePushButton
(   dialogID :LONGINT;
    itemID :LONGINT;
    text :STRING
) ;

Description:

Creates a new push button control in a dialog layout.

Parameters:

dialogID The index of the dialog layout containing the control.
itemID The index that will identify the control item.
text The display text for the control.



  CreateRadioButton Dialogs - Modern 

Declaration:

PROCEDURE   CreateRadioButton
(   dialogID :LONGINT;
    itemID :LONGINT;
    text :STRING
) ;

Description:

Creates a new radio button control in a dialog layout.

Radio button groups can be created by defining two or more radio buttons with consecutive index values. When defined as a button group, VectorScript will handle selection-deselection of controls within the group.

Parameters:

dialogID The index of the dialog layout containing the control.
itemID The index that will identify the control item.
text The display text for the control.

Example:

{ creates a radio button with the specified label }
	CreateRadioButton(lEditID,8,'Visible');

	CreateRadioButton(lEditID,9,'Grayed');
	CreateRadioButton(lEditID,10,'Hidden');
	CreateStaticText( lEditID,11,'',6); 



  CreateRadioButtonGroupBox Dialogs - Modern 

Declaration:

PROCEDURE   CreateRadioButtonGroupBox
(   dialogID :LONGINT;
    itemID :LONGINT;
    name :STRING;
    hasFrame :BOOLEAN
) ;

Description:

Creates a radio button group box. The radio button will have name as its label. If hasFrame is true, the group will have a box drawn around it like a regular group box.

Parameters:

dialogID ID of the dialog
itemID ID of the radio button group box
name Title that appears in the radio button group box
hasFrame True whether the group has a frame; false otherwise



  CreateResizableLayout Dialogs - Modern 

Declaration:

FUNCTION   CreateResizableLayout
(   dialogTitle :STRING;
    hasHelp :BOOLEAN;
    defaultButtonName :STRING;
    cancelButtonName :STRING;
    widthResizable :BOOLEAN;
    heightResizable :BOOLEAN
) :LONGINT ;

Description:

Creates a new resizable Layout Manager dialog.

Resizable dialogs raise the ResizeDialogC event when resized.

See Also:

SetEdgeBinding   SetProportionalBinding  



  CreateRightStaticText Dialogs - Modern 

Declaration:

PROCEDURE   CreateRightStaticText
(   dialogID :LONGINT;
    itemID :LONGINT;
    text :STRING;
    widthInCharacters :INTEGER
) ;

Description:

Similar to CreateStaticText, but creates static text that is right-justified in its control field on the dialog.



  CreateSeparator Dialogs - Modern 

Declaration:

PROCEDURE   CreateSeparator
(   dialogID :LONGINT;
    componentID :LONGINT;
    iLength :INTEGER
) ;

Description:

Creates a Layout Manager image separator.



  CreateSheetLayerPullDownMenu Dialogs - Modern 

Declaration:

PROCEDURE   CreateSheetLayerPullDownMenu
(   nDialogID :LONGINT;
    nComponentID :LONGINT;
    nWidthInChars :INTEGER
) ;

Description:

Creates a Layout Manager sheet layer pull down menu control.



  CreateStandardIconControl Dialogs - Modern 

Declaration:

PROCEDURE   CreateStandardIconControl
(   dialogID :LONGINT;
    iconControlID :LONGINT;
    iconNumber :INTEGER
) ;

Description:

Creates a standard icon control, which is used to display the application icon or an alert icon. Valid values for iconNumber are:
0 - Vectorworks application icon
1 - Informational icon
2 - Stop icon
3 - Exclamation mark (warning) icon
4 - Question icon

Parameters:

dialogID ID of the dialog
iconControlID ID of the control within the dialog
iconNumber Constant, listed above, indicating which icon to display.

Example:

dlog := CreateLayout('Untitled Dialog', False, 'OK', 'Cancel');

	CreateStandardIconControl(dlog, 4, 0);
	SetFirstLayoutItem(dlog, 4);

	result := RunLayoutDialog(dlog, EventHandler);




  CreateStaticText Dialogs - Modern 

Declaration:

PROCEDURE   CreateStaticText
(   dialogID :LONGINT;
    itemID :LONGINT;
    text :STRING;
    widthInCharacters :LONGINT
) ;

Description:

Creates a new static text field control in a dialog layout.

To allow the control to size automatically to the text width, pass -1 as the width parameter of the control.

Parameters:

dialogID The index of the dialog layout containing the control.
itemID The index that will identify the control item.
text The display text for the control.
widthInCharacters The width of the control in characters.

Example:

PROCEDURE Example;
VAR
   dialog1 :INTEGER;
   result  :INTEGER;
PROCEDURE Dialog_Handler(VAR item :LONGINT; data :LONGINT);
BEGIN
END;
BEGIN
   dialog1 := CreateLayout('Example Dialog', FALSE, 'OK', 'Cancel');
   CreateEditText(dialog1, 4, 'default text', 16);
   CreateStaticText(dialog1, 5, 'default text', 16);
   SetFirstLayoutItem(dialog1, 4);
   SetBelowItem(dialog1, 4, 5, 0, 0);
   result := RunLayoutDialog(dialog1, Dialog_Handler);
END;
RUN(Example);



  CreateSwapControl Dialogs - Modern 

Declaration:

PROCEDURE   CreateSwapControl
(   dialogID :LONGINT;
    swapControlID :LONGINT
) ;

Description:

Create a swap control within a dialog.

This control manages multiple overlapping groups of controls, of which a single group of controls is displayed at a time. The script is able to control which group is displayed based on other data in the dialog. For example, a dialog may present a scrolling list of items on the left, and a swap control on the right. As the user selects items in the list, different sets of controls are enabled on the right. This can be used for a settings (preferences) style dialog or when there are too many choices to use a Tab control effectively.

Parameters:

dialogID ID of the dialog.
swapControlID ID of the swap control.

See Also:

CreateSwapPane   DisplaySwapPane  



  CreateSwapPane Dialogs - Modern 

Declaration:

PROCEDURE   CreateSwapPane
(   dialogID :LONGINT;
    swapControlID :LONGINT;
    newGroupID :LONGINT
) ;

Description:

Creates a swap pane within the specified swap control. Within a swap control, only one swap pane is visible at a time.

Parameters:

dialogID the ID of the dialog
swapControlID the ID of the swap control
newGroupID the ID of the group to be inserted into swap control as a swap pane.

Example:

PROCEDURE dialog1_Main;
CONST
	kOK            = 1;
	kCancel        = 2;
	kTabControl    = 4;
	kTabPane_1     = 5;
	kTabPane_2     = 6;
	kSwapControl_1 = 7;
	kSwapControl_2 = 8;
	kSwapPane_11   = 9;
	kSwapPane_21   = 10;
	kSwapPane_12   = 11;
	kSwapPane_22   = 12;
	kButton_11     = 13;
	kButton_21     = 14;
	kButton_12     = 15;
	kButton_22     = 16;
VAR
	dialog1          :INTEGER;

PROCEDURE dialog1_Setup;
BEGIN
	dialog1 := CreateLayout('Tabs and Swaps', False, 'OK', 'Cancel');
	CreateTabControl         (dialog1, kTabControl);
	CreateGroupBox           (dialog1, kTabPane_1,      'Tab Pane 1', True);
	CreateGroupBox           (dialog1, kTabPane_2,      'Tab Pane 2', True);
	CreateSwapControl        (dialog1, kSwapControl_1);
	CreateSwapControl        (dialog1, kSwapControl_2);
	CreateGroupBox           (dialog1, kSwapPane_11,    '', True);
	CreateGroupBox           (dialog1, kSwapPane_21,    '', True);
	CreateGroupBox           (dialog1, kSwapPane_12,    '', True);
	CreateGroupBox           (dialog1, kSwapPane_22,    '', True);
	CreatePushButton         (dialog1, kButton_11,      'Button 1');
	CreatePushButton         (dialog1, kButton_21,      'Button 3');
	CreatePushButton         (dialog1, kButton_12,      'Button 2');
	CreatePushButton         (dialog1, kButton_22,      'Button 4');

	SetFirstLayoutItem(dialog1, kTabControl);
	CreateTabPane     (dialog1, kTabControl,     kTabPane_1);
	SetFirstGroupItem (dialog1, kTabPane_1,      kSwapControl_1);
	CreateSwapPane    (dialog1, kSwapControl_1,  kSwapPane_11);
	SetFirstGroupItem (dialog1, kSwapPane_11,    kButton_11);
	CreateSwapPane    (dialog1, kSwapControl_1,  kSwapPane_12);
	SetFirstGroupItem (dialog1, kSwapPane_12,    kButton_12);
	CreateTabPane     (dialog1, kTabControl,     kTabPane_2);
	SetFirstGroupItem (dialog1, kTabPane_2,      kSwapControl_2);
	CreateSwapPane    (dialog1, kSwapControl_2,  kSwapPane_21);
	SetFirstGroupItem (dialog1, kSwapPane_21,    kButton_21);
	CreateSwapPane    (dialog1, kSwapControl_2,  kSwapPane_22);
	SetFirstGroupItem (dialog1, kSwapPane_22,    kButton_22);
END;

PROCEDURE dialog1_Handler(VAR item :LONGINT; data :LONGINT);
BEGIN
END;

BEGIN
	dialog1_Setup;
	IF RunLayoutDialog(dialog1, dialog1_Handler) = 1 then BEGIN
	END;
END;
RUN(dialog1_Main);

See Also:

CreateSwapControl   DisplaySwapPane  



  CreateSymbolDisplayControl Dialogs - Modern 

Declaration:

PROCEDURE   CreateSymbolDisplayControl
(   dialogID :LONGINT;
    itemID :LONGINT;
    symbolName :STRING;
    height :INTEGER;
    width :INTEGER;
    margin :INTEGER;
    renderMode :INTEGER;
    view :INTEGER
) ;

Description:

Creates a new symbol display control in the dialog layout. The control displays the specified symbol in the specified rendering mode and view. The actual size of the symbol is not relevent; it is shown as large as possible in the given height and width (the height to width ratio of the symbol is always preserved). To show a blank SymbolDisplay control, use an empty string as the symbolName parameter.

Table - Render Modes

Render Mode Constant
Wireframe 0
Unshaded Polygon 2
Shaded Polygon 3
Shaded Polygon No Lines 4
Final Shaded Polygon 5
Hidden Line 6
Dashed Hidden Line 7
OpenGL 11
Fast RenderWorks 12
Fast RenderWorks with Shadows 13
Final Quality RenderWorks 14
Custom RenderWorks 15
Artistic RenderWorks 17
Sketch 18


Table - Views

View Constant
Top/Plan 2
Front 3
Back 4
Left 5
Right 6
Top 7
Bottom 8
Right Isometric 9
Left Isometric 10
Right Rear Isometric 11
Left Rear Isometric 12
Bottom Right Isometric 13
Bottom Left Isometric 14
Bottom Right Rear Isometric 15
Bottom Left Rear Isometric 16

Parameters:

dialogID The ID of the dialog in which to create the control.
itemID The item ID of the control.
symbolName The name of the symbol to display.
height The height of the control in pixels.
width The width of the control in pixels.
margin The margin bewteen the border of the control and the symbol in pixels.
renderMode The render mode in which to display the symbol.
view The view in which to display the symbol.

Example:

CreateSymbolDisplayControl( 5, 6, 'Chair', 350, 200, 5, 11, 9 );

This creates a dialog control that displays the symbol called "Chair."  The control is 350 pixels high and 200 pixels wide, with a margin of 5 pixels.  The symbol is rendered in OpenGL mode and displayed in a right isometric view.

PROCEDURE Example;
VAR
	dialog1 :INTEGER;
	int     :INTEGER;

PROCEDURE dialog1_Handler(VAR item :LONGINT; data :LONGINT);
BEGIN
END;

BEGIN
	dialog1 := CreateLayout('Example', TRUE, 'OK', 'Cancel');
	CreateSymbolDisplayControl(dialog1,  4,  'Symbol-1', 128, 128, 0, 11, 9);
	SetFirstLayoutItem(dialog1,  4);
	int := RunLayoutDialog(dialog1, dialog1_Handler);
END;
RUN(Example);

See Also:

UpdateSymbolDisplayControl  



  CreateTabControl Dialogs - Modern 

Declaration:

PROCEDURE   CreateTabControl
(   dialogID :LONGINT;
    itemID :LONGINT
) ;

Description:

Creates a tab control within a dialog. The tab control manages the display of multiple panes of information and provides tab buttons that allow the user to swtich between panes.

To create a tab control in a dialog, first define a group for each tab pane. Add other controls to the groups and arrange them. Then call CreateTabControl with an id. Finally, call CreateTabPane for each pane providing the id of the group that defines that pane.

Parameters:

dialogID The id of the dialog that contains this Tab control.
itemID The id of the Tab control.

Example:

Procedure TabControls;

const
	kTabControlID = 10;
	kTabPaneID1 = 20;
	kTabPaneID2 = 30;
	kTabPaneID3	= 40;
	
var
	dlogID, result  : LONGINT;
	
Procedure DialogProc(VAR item: LONGINT; data: LONGINT);
begin
	case item of
		SetupDialogC:
			begin
				result := 0;
			end;

		end;
end;

begin
	dlogID := CreateLayout('Sample Tab Dialog', false, 'OK', 'Cancel');

	{ Tab Group 1 }
	CreateGroupBox(dlogID, kTabPaneID1, 'Tab 1', FALSE);
	
	CreatePushButton(dlogID, 21, 'Button 1');
	SetFirstGroupItem(dlogID, kTabPaneID1, 21);	
	CreatePushButton(dlogID, 22, 'Button 2');
	SetBelowItem(dlogID, 21, 22, 0, 0);
	CreatePushButton(dlogID, 23, 'Button 3');
	SetBelowItem(dlogID, 22, 23, 0, 0);
	
	
	{ Tab Group 2 }
	CreateGroupBox(dlogID, kTabPaneID2, 'Tab 2', FALSE);
	
	CreatePushButton(dlogID, 31, 'Button 4');
	SetFirstGroupItem(dlogID, kTabPaneID2, 31);
	CreatePushButton(dlogID, 32, 'Button 5');
	SetRightItem(dlogID, 31, 32, 0, 0);
	CreatePushButton(dlogID, 33, 'Button 6');
	SetRightItem(dlogID, 32, 33, 0, 0);
	
	
	{ Tab Group 3 }
	CreateGroupBox(dlogID, kTabPaneID3, 'Tab 3', FALSE);
	
	CreatePushButton(dlogID, 41, 'Button 7');
	SetFirstGroupItem(dlogID, kTabPaneID3, 41);
	CreatePushButton(dlogID, 42, 'Button 8');
	SetRightItem(dlogID, 41, 42, 0, 0);
	CreatePushButton(dlogID, 43, 'Button 9');
	SetBelowItem(dlogID, 42, 43, 0, 0);
	

	{ Create tab control 1 }
	CreateTabControl(dlogID, kTabControlID);
	SetFirstLayoutItem(dlogID, kTabControlID);
	
	{ Add the tab panes to tab control }
	CreateTabPane(dlogID, kTabControlID, kTabPaneID1);
	CreateTabPane(dlogID, kTabControlID, kTabPaneID2);
	CreateTabPane(dlogID, kTabControlID, kTabPaneID3);
	
	result := RunLayoutDialog(dlogID, DialogProc);
end;
Run(TabControls);

See Also:

CreateTabPane   CreateGroupBox   RunLayoutDialog  



  CreateTabPane Dialogs - Modern 

Declaration:

PROCEDURE   CreateTabPane
(   dialogID :LONGINT;
    itemID :LONGINT;
    groupID :LONGINT
) ;

Description:

Creates a tab pane within a tab control on a dialog.

To define a tab pane, create a group control and add items to the group. Arrange the items within the group. Then call CreateTabPane to add a new tab pane to a tab control. Specify the group that defines the layout of that tab pane.

Parameters:

dialogID The id of the dialog.
itemID The id of the Tab Control to which this tab pane will be added.
groupID The id of the group that defines the tab pane.

Example:

{ Create tab control }
	CreateTabControl(dlogID, kTabControlID);
	
	{ Add the tab panes to tab control }
	CreateTabPane(dlogID, kTabControlID, kTabPaneID1);
	CreateTabPane(dlogID, kTabControlID, kTabPaneID2);
	CreateTabPane(dlogID, kTabControlID, kTabPaneID3);

See Also:

CreateTabControl   CreateGroupBox   RunLayoutDialog  



  CreateThreeStateCheckBox Dialogs - Modern 

Declaration:

PROCEDURE   CreateThreeStateCheckBox
(   dialogID :LONGINT;
    componentID :LONGINT;
    strName :STRING
) ;

Description:

Creates a Layout Manager three state checkbox.



  CreateTreeControl Dialogs - Modern 

Declaration:

PROCEDURE   CreateTreeControl
(   nDialogID :LONGINT;
    nComponentID :LONGINT;
    nWidthInChars :INTEGER;
    nHeightInChars :INTEGER
) ;

Description:

Creates a Layout Manager tree control.

Example:

PROCEDURE Example;
VAR
   dialog1 :INTEGER;
   result  :INTEGER;
   widthInChars, heightInChars :INTEGER;
   root1, root2, child1, child2 :INTEGER;

PROCEDURE Dialog_Handler(VAR item :LONGINT; data :LONGINT);
BEGIN
   CASE item OF
      SetupDialogC:
         BEGIN
            root1 := InsertTreeControlItem(dialog1, 4, 'root1', -1, 0);
            child1 := InsertTreeControlItem(dialog1, 4, 'child1', root1, 0);
            child2 := InsertTreeControlItem(dialog1, 4, 'child2', root1, child1);
            root2 := InsertTreeControlItem(dialog1, 4, 'root2', -1, root1);
            child1 := InsertTreeControlItem(dialog1, 4, 'child1', root2, 0);
            child2 := InsertTreeControlItem(dialog1, 4, 'child2', root2, child1);
         END;
   END;
END;

BEGIN
   dialog1 := CreateLayout('Example Dialog', FALSE, 'OK', 'Cancel');
   widthInChars := 28;
   heightInChars := 8;
   CreateTreeControl(dialog1, 4, widthInChars, heightInChars);
   SetFirstLayoutItem(dialog1, 4);
   result := RunLayoutDialog(dialog1, Dialog_Handler);
END;
RUN(Example);

See Also:

GetTreeControlSelectedItem   InsertTreeControlItem   RemoveTreeControlItem  



  DeleteAllItems Dialogs - Modern 

Declaration:

PROCEDURE   DeleteAllItems
(   dialogID :LONGINT;
    itemID :LONGINT
) ;

Description:

Deletes all rows from the specified list box.

Parameters:

dialogID ID of the dialog
itemID ID of the list box



  DeselectEditText Dialogs - Modern 

Declaration:

PROCEDURE   DeselectEditText
(   dialogID :LONGINT;
    controlID :LONGINT
) ;

Description:

Deselects all text in the specified edit control.



  DisplaySwapPane Dialogs - Modern 

Declaration:

PROCEDURE   DisplaySwapPane
(   dialogID :LONGINT;
    swapControlID :LONGINT;
    groupNumber :LONGINT
) ;

Description:

Causes the specified swap pane to be displayed within the specified swap control.

This is called from the dialog's event handling routine.

Parameters:

dialogID the ID of the dialog
swapControlID the ID of the swap control
groupNumber 1-based index of the swap pane to be displayed

Example:

Procedure DialogProc(VAR item: LONGINT; data: LONGINT);
BEGIN
	CASE item OF
		SetupDialogC:
		BEGIN
			result := 0;
		END;

		100:	DisplaySwapPane(dlogID, 10, 1);  { Display pane 1 }
		101:	DisplaySwapPane(dlogID, 10, 2);  { Display pane 2 }
		102:	DisplaySwapPane(dlogID, 10, 3);  { Display pane 3 }

	END;
END;

See Also:

CreateSwapControl   CreateSwapPane  



  DisplayTabPane Dialogs - Modern 

Declaration:

PROCEDURE   DisplayTabPane
(   dialogID :LONGINT;
    tabControlID :LONGINT;
    groupNumber :LONGINT
) ;

Description:

Causes the specified swap pane to be displayed within the specified swap control.

This is called from the dialog's event handling routine.

Parameters:

dialogID the ID of the dialog
tabControlID the ID of the swap control
groupNumber 1-based index of the swap pane to be displayed

Example:

Procedure DialogProc(VAR item: LONGINT; data: LONGINT);
BEGIN
	CASE item OF
		SetupDialogC:
		BEGIN
			result := 0;
		END;

		100:	DisplaySwapPane(dlogID, 10, 1);  { Display pane 1 }
		101:	DisplaySwapPane(dlogID, 10, 2);  { Display pane 2 }
		102:	DisplaySwapPane(dlogID, 10, 3);  { Display pane 3 }

	END;
END;

See Also:

CreateSwapControl   CreateSwapPane  



  EnableLBDropOnIndices Dialogs - Modern 

Declaration:

FUNCTION   EnableLBDropOnIndices
(   dialogID :LONGINT;
    componentID :LONGINT;
    iStartIndex :INTEGER;
    iEndIndex :INTEGER;
    bEnable :BOOLEAN
) :BOOLEAN ;

Description:

Enables or disables drag and drop to occur within the specified indices.



  ExpandTreeControlItem Dialogs - Modern 

Declaration:

PROCEDURE   ExpandTreeControlItem
(   nDialogID :LONGINT;
    nComponentID :LONGINT;
    nItemID :INTEGER;
    bExpand :BOOLEAN
) ;

Description:

Expands or collapses the specified tree control item.



  GetActiveEditItem Dialogs - Modern 

Declaration:

FUNCTION   GetActiveEditItem
( dialogID:LONGINT ) :LONGINT ;

Description:

Returns the active edit control in the specified dialog. If no edit control has the focus, -1 is returned.



  GetActivePane Dialogs - Modern 

Declaration:

FUNCTION   GetActivePane
(   dialogID :LONGINT;
    tabControlID :LONGINT
) :LONGINT ;

Description:

Returns the currently displayed tab or swap pane in the specified tab or swap control.

This is called from the dialog's event handling routine.

Parameters:

dialogID the ID of the dialog
tabControlID the ID of the swap control

Example:

Procedure DialogProc(VAR item: LONGINT; data: LONGINT);
BEGIN
	CASE item OF
		SetupDialogC:
		BEGIN
			result := 0;
		END;

		100:	DisplaySwapPane(dlogID, 10, 1);  { Display pane 1 }
		101:	DisplaySwapPane(dlogID, 10, 2);  { Display pane 2 }
		102:	DisplaySwapPane(dlogID, 10, 3);  { Display pane 3 }

	END;
END;

See Also:

CreateSwapControl   CreateSwapPane  



  GetColorButton Dialogs - Modern 

Declaration:

PROCEDURE   GetColorButton
(   dialogID :LONGINT;
    itemID :LONGINT;
  VAR  red :LONGINT;
  VAR  green :LONGINT;
  VAR  blue :LONGINT
) ;

Description:

Gets the color of a modern dialog color button.

Parameters:

dialogID The index of the dialog layout containing the control.
itemID The index of the color button.
red The red component of the color.
green The green component of the color.
blue The blue component of the color.

See Also:

SetColorButton  



  GetColorChoice Dialogs - Modern 

Declaration:

PROCEDURE   GetColorChoice
(   dialogID :LONGINT;
    itemID :LONGINT;
  VAR  colorIndex :INTEGER
) ;

Description:

Get current choice for color popup dialog control.

Example:

PROCEDURE Example;
VAR
   dialog1 :INTEGER;
   result  :INTEGER;
PROCEDURE Dialog_Handler(VAR item :LONGINT; data :LONGINT);
BEGIN
   CASE item OF
      SetupDialogC:
         BEGIN
            SetColorChoice(dialog1, 4, 1242);
         END;
      1:
         BEGIN
            GetColorChoice(dialog1, 4, result);
            AlrtDialog(Concat('color index: ', result));
         END;
   END;
END;
BEGIN
   dialog1 := CreateLayout('Example Dialog', FALSE, 'OK', 'Cancel');
   CreateColorPopup(dialog1, 4, 24);
   SetFirstLayoutItem(dialog1, 4);
   result := RunLayoutDialog(dialog1, Dialog_Handler);
END;
RUN(Example);



  GetComponentRect Dialogs - Modern 

Declaration:

FUNCTION   GetComponentRect
(   nDialogID :LONGINT;
    nComponentID :LONGINT;
  VAR  nLeft :INTEGER;
  VAR  nTop :INTEGER;
  VAR  nRight :INTEGER;
  VAR  nBottom :INTEGER
) :BOOLEAN ;

Description:

Retrieves the bounding rect coordinates of the specified Layout Manager component.



  GetComponentTextWidth Dialogs - Modern 

Declaration:

FUNCTION   GetComponentTextWidth
(   nDialogID :LONGINT;
    nComponentID :LONGINT;
  VAR  nWidthInLMUnits :INTEGER
) :BOOLEAN ;

Description:

Retrieves the static text's width in Layout Manager Units.



  GetControlData Dialogs - Modern 

Declaration:

PROCEDURE   GetControlData
(   dialogID :LONGINT;
    itemID :LONGINT;
  VAR  data :LONGINT
) ;

Description:

Returns information about the specified extended control item.

Parameters:

dialogID Index of dialog layout containing the control item.
itemID Index of the control item.
data Current setting of the control.



  GetEditInteger Dialogs - Modern 

Declaration:

FUNCTION   GetEditInteger
(   dialogID :LONGINT;
    itemID :LONGINT;
  VAR  value :LONGINT
) :BOOLEAN ;

Description:

Returns the numeric value from the specified INTEGER numeric edit field control.

Parameters:

dialogID The index of the dialog layout containing the control.
itemID The index of the control item.
value The value contained in the field.

Result:

A BOOLEAN value indicating the success of the operation.



  GetEditReal Dialogs - Modern 

Declaration:

FUNCTION   GetEditReal
(   dialogID :LONGINT;
    itemID :LONGINT;
    editRealType :LONGINT;
  VAR  value :REAL
) :BOOLEAN ;

Description:

Returns the numeric value from the specified REAL numeric edit field control.

Parameters:

dialogID The index of the dialog layout containing the control.
itemID The index of the control item.
editRealType The type of REAL value being returned.
value The value contained in the field.

Result:

A BOOLEAN value indicating the success of the operation.

Example:

PROCEDURE Dialog_Handler(var item :LONGINT; data :LONGINT);

PROCEDURE InvalidValue(controlID :INTEGER);
BEGIN
	item := -1;
	SelField(controlID);
	SysBeep;
END;

BEGIN
	CASE item OF
	     	SetupDialogC: SetEditReal(dialogID, 11, 3, elevation);
     		1: IF NOT(GetEditReal(dialogID, 11, 3, elevation)) 
                 THEN InvalidValue(11);
	END;
END;



  GetGradientSliderData Dialogs - Modern 

Declaration:

PROCEDURE   GetGradientSliderData
(   dialogID :LONGINT;
    componentID :LONGINT;
    segmentIndex :INTEGER;
  VAR  spotPosition :REAL;
  VAR  midpointPosition :REAL;
  VAR  red :LONGINT;
  VAR  green :LONGINT;
  VAR  blue :LONGINT
) ;

Description:

Gets the spot position, midpoint position and color of the specified gradient slider segment.

Parameters:

dialogID Index to the dialog layout that contains the gradient slider component.
componentID Index to a specific gradient slider component.
segmentIndex Segment from which to get the data.
(segment indexes begin with 1)
spotPosition Position of the segment's color marker relative to left-most point of the slider.
(position >= 0.0 and position <= 1.0)
midpointPosition Position of the segment's midpoint marker relative to color marker immediately to left.
(position >= 0.0 and position <= 1.0)
red Red component of the color spot's color.
(red >= 0 and red <= 255)
green Green component of the color spot's color.
(green >= 0 and green <= 255)
blue Blue component of the color spot's color.
(blue >= 0 and blue <= 255)

Example:

GetGradientSliderData(dialogID, componentID, 4, 0.7, 0.3, 255, 255, 255);



  GetGradientSliderSelectedMarker Dialogs - Modern 

Declaration:

PROCEDURE   GetGradientSliderSelectedMarker
(   dialogID :LONGINT;
    componentID :LONGINT;
  VAR  segmentIndex :INTEGER;
  VAR  markerType :INTEGER
) ;

Description:

Gets the selected marker for the specified gradient slider.

Note: use the number, 1, to identify a color marker and the number, 2, to identify a midpoint marker.

Parameters:

dialogID Index to the dialog layout that contains the gradient slider component.
componentID Index to a specific gradient slider component.
segmentIndex Index to segment containing selected marker.
(segment indexes begin with 1)
markerType Type of marker selected.
(1 = color marker, 2 = midpoint marker)

Example:

GetGradientSliderSelectedMarker(dialogID, componentID, segmentIndex, markerType);



  GetIconPushButtonState Dialogs - Modern 

Declaration:

FUNCTION   GetIconPushButtonState
(   nDialogID :LONGINT;
    nComponentID :LONGINT;
  VAR  bPressed :BOOLEAN
) :BOOLEAN ;

Description:

Retrieves the state of the specified Layout Manager icon push button (pressed or not pressed).



  GetImagePopupObject Dialogs - Modern 

Declaration:

FUNCTION   GetImagePopupObject
(   dialogID :LONGINT;
    componentID :LONGINT;
    itemIndex :INTEGER
) :STRING ;

Description:

Returns the object name for the specified image popup item.

Parameters:

dialogID Index to the dialog layout that contains the image popup component.
componentID Index to a specific image popup component.
itemIndex Image popup item index for object to be retrieved.

Result:

Returns name of object stored at specified image popup index.

Example:

objectName := GetImagePopupObject(dialogID, componentID, 4);

See Also:

InsertImagePopupObjectItem   GetNumImagePopupItems   GetImagePopupObjectItemIndex   SetImagePopupSelectedItem   GetImagePopupSelectedItem   RemoveImagePopupItem   RemoveAllImagePopupItems  



  GetImagePopupObjectItemIndex Dialogs - Modern 

Declaration:

FUNCTION   GetImagePopupObjectItemIndex
(   dialogID :LONGINT;
    componentID :LONGINT;
    objectName :STRING
) :INTEGER ;

Description:

Returns item index for the specified object.

Parameters:

dialogID Index to the dialog layout that contains the image popup component.
componentID Index to a specific image popup component.
objectName Name of object for which the image popup index should be retrieved.

Result:

Returns the image popup index for the specified object.

Example:

imagePopupIndex := GetImagePopupObjectItemIndex(dialogID, componentID, 'Symbol-1');

See Also:

InsertImagePopupObjectItem   GetNumImagePopupItems   GetImagePopupObject   SetImagePopupSelectedItem   GetImagePopupSelectedItem   RemoveImagePopupItem   RemoveAllImagePopupItems  



  GetImagePopupSelectedItem Dialogs - Modern 

Declaration:

FUNCTION   GetImagePopupSelectedItem
(   dialogID :LONGINT;
    componentID :LONGINT
) :INTEGER ;

Description:

Gets the selected image popup item.

Parameters:

dialogID Index to the dialog layout that contains the image popup component.
componentID Index to a specific image popup component.

Result:

Returns the image popup index for the currently selected item.

Example:

selectedItemIndex := GetImagePopupSelectedItem(dialogID, componentID);

See Also:

InsertImagePopupObjectItem   GetNumImagePopupItems   GetImagePopupObject   GetImagePopupObjectItemIndex   SetImagePopupSelectedItem   RemoveImagePopupItem   RemoveAllImagePopupItems  



  GetLayoutDialogPosition Dialogs - Modern 

Declaration:

FUNCTION   GetLayoutDialogPosition
(   dialogID :LONGINT;
  VAR  left :INTEGER;
  VAR  top :INTEGER;
  VAR  right :INTEGER;
  VAR  bottom :INTEGER
) :BOOLEAN ;

Description:

This function will retrieve the screen location of the dialog window, in pixels.

This function can be useful for displaying a dialog in a position in which it was placed during prior use.

Parameters:

dialogID Index of the dialog.
left Location of left edge of dialog, in pixels.
top Location of top of dialog, in pixels.
right Location of right edge of dialog, in pixels.
bottom Location of bottom edge of dialog, in pixels.

Result:

true - success - the location of the dialog window was retrieved.
false - failure - the location of the dialog window was not retrieved, likely because it does not currently exist, or the dialogID is invalid. The dialog window will exist anytime between the Setup message and OK/Cancel message.

See Also:

SetLayoutDialogPosition  



  GetLayoutDialogSize Dialogs - Modern 

Declaration:

PROCEDURE   GetLayoutDialogSize
(   dialogID :LONGINT;
  VAR  width :INTEGER;
  VAR  height :INTEGER
) ;

Description:

Retrieves a Layout Manager dialog's size, in pixels.



  GetLBHeaderTextWidth Dialogs - Modern 

Declaration:

FUNCTION   GetLBHeaderTextWidth
(   className :STRING;
    allowForSortIcon :BOOLEAN
) :INTEGER ;

Description:

Produces the width in pixels that will show the given string without truncation in a listbrowser column header. This will provide a guaranteed appropriate width for InsertLBColumn.



  GetLineAttributeData Dialogs - Modern 

Declaration:

PROCEDURE   GetLineAttributeData
(   dialogID :LONGINT;
    itemID :LONGINT;
  VAR  lineStyle :INTEGER;
  VAR  lineWeight :INTEGER
) ;

Description:

Get the current choices for the combined line style and line weight dialog control. The line style value is an index and the line weight value is in mils.



  GetLineStyleChoice Dialogs - Modern 

Declaration:

PROCEDURE   GetLineStyleChoice
(   dialogID :LONGINT;
    itemID :LONGINT;
  VAR  lineStyle :INTEGER
) ;

Description:

Get current choice of line style popup dialog control. Choice is an index into list of linestyles available in current document.



  GetLineWeightChoice Dialogs - Modern 

Declaration:

PROCEDURE   GetLineWeightChoice
(   dialogID :LONGINT;
    itemID :LONGINT;
  VAR  lineWeight :INTEGER
) ;

Description:

Get current choice for a line weight dialog control. The value is in mils.



  GetMarkerChoice Dialogs - Modern 

Declaration:

PROCEDURE   GetMarkerChoice
(   dialogID :LONGINT;
    itemID :LONGINT;
  VAR  index :INTEGER;
  VAR  style :INTEGER;
  VAR  angle :INTEGER;
  VAR  size :REAL
) ;

Special Notes:

GetMarkerChoice is obsolete as of VectorWorks13.0

Description:

OBSOLETE procedure for VW2008
Get current choice for Marker popup dialog control.

Example:

PROCEDURE Example;
VAR
   int, dialogID   :INTEGER;
   index, style, angle :INTEGER;
   size :REAL;

PROCEDURE Dialog_Handler(VAR item :LONGINT; data :LONGINT);
BEGIN
   CASE item OF
      SetupDialogC:
         BEGIN
            index := 1;
            style := 2;
            angle := 3;
            size  := .125;
            SetMarkerChoice(dialogID, 4, index, style, angle, size);
         END;
      5: 
         BEGIN
            GetMarkerChoice(dialogID, 4, index, style, angle, size);
            AlrtDialog(Concat(
	            'index: ', index, Chr(13), 
	            'style: ', style, Chr(13), 
	            'angle: ', angle, Chr(13), 
	            'size: ', size));
         END;
   END;
END;

BEGIN
   dialogID := CreateLayout('Test', False, 'OK', '');
   CreateMarkerPopup(dialogID, 4);
   CreatePushButton(dialogID, 5, '  Display Values  ');
   SetFirstLayoutItem(dialogID, 4);
   SetBelowItem(dialogID, 4, 5, 0, 2);
   int := RunLayoutDialog(dialogID, Dialog_Handler);
END;
RUN(Example);

See Also:

SetMarkerChoice  



  GetMarkerPopupSelectedItem Dialogs - Modern 

Declaration:

FUNCTION   GetMarkerPopupSelectedItem
(   dialogID :LONGINT;
    componentID :LONGINT;
  VAR  style :INTEGER;
  VAR  angle :INTEGER;
  VAR  size :INTEGER
) :INTEGER ;

Description:

This is a deprecated function. Use GetMarkerChoice instead.

Returns the 1-based index number of the selected item in the specified marker popup menu item. If return value is 8, a custom marker is selected.

Parameters:

dialogID ID of the dialog
componentID ID of the marker popup item
style On return, indicates the style of the selected marker. Valid styles:
0 - kFilledArrowMarker
1 - kEmptyArrowMarker
2 - kOpenArrowMarker
3 - kFilledBallMarker
4 - kEmptyBallMarker
5 - kSlashMarker
6 - kCrossMarker

angle On return, indicates the angle of the selected marker, for arrow markers
size On return, indicates the size of the selected marker



  GetMarkerValue Dialogs - Modern 

Declaration:

PROCEDURE   GetMarkerValue
(   dialogID :LONGINT;
    itemID :LONGINT;
  VAR  style :INTEGER;
  VAR  angle :INTEGER;
  VAR  length :REAL;
  VAR  width :REAL;
  VAR  basis :INTEGER;
  VAR  thickness :REAL
) ;

Description:

Gets MarkerPopup value in dialog (replaces MarkerPopup procedures prior to VW2008).

Parameters:

dialogID ID of the dialog
itemID ID of the marker popup control
style On return, indicates the style of the selected marker
angle On return, indicates the angle of the selected marker (deg)
length On return, indicates the length of the selected marker (inches)
width On return, indicates the width of the selected marker (inches)
basis On return, indicates the thickness basis of the selected marker.
thickness On return, indicates the thickness of the selected marker.

Example:

PROCEDURE Example;
VAR
   int, dialogID   :INTEGER;
   style, angle, thicknessBasis :INTEGER;
   width, length, thickness :REAL;

PROCEDURE Dialog_Handler(VAR item :LONGINT; data :LONGINT);
BEGIN
   CASE item OF
      SetupDialogC:
         BEGIN
            style := 130;
            angle := 0;
            width  := .125;
		length := .125;
		thickness := 0;
		thicknessBasis := 0;
            SetMarkerValue(dialogID, 4, style, angle, width, length, thicknessBasis, thickness);
         END;
      5: 
         BEGIN
           GetMarkerValue(dialogID, 4, style, angle, width, length, thicknessBasis, thickness);

            AlrtDialog(Concat(
               'style: ', style, Chr(13), 
               'angle: ', angle, Chr(13), 
		 'width: ', width,Chr(13),
               'length: ', length, Chr(13),
		  'thickness: ', thickness, Chr(13),
		  'thicknessBasis: ', thicknessBasis));

         END;
   END;
END;

BEGIN
   dialogID := CreateLayout('Test', False, 'OK', '');
   CreateMarkerPopup(dialogID, 4);
   CreatePushButton(dialogID, 5, '  Display Values  ');
   SetFirstLayoutItem(dialogID, 4);
   SetBelowItem(dialogID, 4, 5, 0, 2);
   int := RunLayoutDialog(dialogID, Dialog_Handler);
END;
RUN(Example);

See Also:

SetmarkerValue  



  GetNumGradientSliderSegments Dialogs - Modern 

Declaration:

FUNCTION   GetNumGradientSliderSegments
(   dialogID :LONGINT;
    componentID :LONGINT
) :INTEGER ;

Description:

Gets the number of segments in the gradient slider.

Note: a gradient slider must always have at least 2 segments.

Parameters:

dialogID Index to the dialog layout that contains the gradient slider component.
componentID Index to a specific gradient slider component.

Result:

Retuns number of segments in gradient slider.

(a segment consists of a color marker and the associated midpoint marker immediately to the right)

Example:

numSegments := GetNumGradientSliderSegments(dialogID, componentID);



  GetNumImagePopupItems Dialogs - Modern 

Declaration:

FUNCTION   GetNumImagePopupItems
(   dialogID :LONGINT;
    componentID :LONGINT
) :INTEGER ;

Description:

Returns the number of items in the image popup.

Parameters:

dialogID Index to the dialog layout that contains the image popup component.
componentID Index to a specific image popup component.

Result:

Returns the number of items in the specified image popup.

Example:

numImagePopupItems := GetNumImagePopupItems(dialogID, componentID);

See Also:

InsertImagePopupObjectItem   GetImagePopupObject   GetImagePopupObjectItemIndex   SetImagePopupSelectedItem   GetImagePopupSelectedItem   RemoveImagePopupItem   RemoveAllImagePopupItems  



  GetPatternData Dialogs - Modern 

Declaration:

PROCEDURE   GetPatternData
(   dialogID :LONGINT;
    itemID :LONGINT;
  VAR  patternIndex :INTEGER;
  VAR  foreColor :INTEGER;
  VAR  backColor :INTEGER
) ;

Description:

Get current choice for pattern popup dialog control, and the displayed foreground and background color indexes.



  GetSelectionRange Dialogs - Modern 

Declaration:

PROCEDURE   GetSelectionRange
(   dialogID :LONGINT;
    controlID :LONGINT;
  VAR  startPos :INTEGER;
  VAR  endPos :INTEGER
) ;

Description:

Returns the range of the current selection for the specified control.



  GetThreeStateCheckBoxState Dialogs - Modern 

Declaration:

PROCEDURE   GetThreeStateCheckBoxState
(   dialogID :LONGINT;
    componentID :LONGINT;
  VAR  iState :INTEGER
) ;

Description:

Retrieves the state of a Layout Manager three state checkbox.



  GetTreeControlItemData Dialogs - Modern 

Declaration:

PROCEDURE   GetTreeControlItemData
(   nDialogID :LONGINT;
    nComponentID :LONGINT;
    nItemID :INTEGER;
  VAR  nUserData :LONGINT
) ;

Description:

Retrieves the user data of the specified item from a tree control.



  GetTreeControlSelectedItem Dialogs - Modern 

Declaration:

FUNCTION   GetTreeControlSelectedItem
(   nDialogID :LONGINT;
    nComponentID :LONGINT;
  VAR  nItemID :INTEGER
) :BOOLEAN ;

Description:

Retrieves the itemID of the selected item from a Layout Manager tree control.



  InsertEnhancedPullDownMenuItem Dialogs - Modern 

Declaration:

FUNCTION   InsertEnhancedPullDownMenuItem
(   dialogID :LONGINT;
    componentID :LONGINT;
    strName :STRING;
    iIconID :INTEGER
) :INTEGER ;

Description:

Inserts the item into the specified Layout Manager enhanced pull down menu control.



  InsertGradientSliderSegment Dialogs - Modern 

Declaration:

FUNCTION   InsertGradientSliderSegment
(   dialogID :LONGINT;
    componentID :LONGINT;
    spotPosition :REAL;
    red :LONGINT;
    green :LONGINT;
    blue :LONGINT
) :INTEGER ;

Description:

Inserts a new segment into the gradient slider and initializes its data to the specified values.

Parameters:

dialogID Index to the dialog layout that contains the gradient slider component.
componentID Index to a specific gradient slider component.
spotPosition Position of the segment's color marker relative to left-most point of the slider.
(position >= 0.0 and position <= 1.0)
red Red component of the color spot's color.
(red >= 0 and red <= 255)
green Green component of the color spot's color.
(green >= 0 and green <= 255)
blue Blue component of the color spot's color.
(blue >= 0 and blue <= 255)

Result:

Returns index to new segment.

Example:

segmentIndex := InsertGradientSliderSegment(dialogID, componentID, 0.4, 255, 255, 255);



  InsertImagePopupObjectItem Dialogs - Modern 

Declaration:

FUNCTION   InsertImagePopupObjectItem
(   dialogID :LONGINT;
    componentID :LONGINT;
    objectName :STRING
) :INTEGER ;

Description:

Inserts the specified object into the image popup.

Note: the image popup only supports the following object types: gradients, hatches, images, record formats, render backgrounds, symbol folders, symbols, textures, vectorscript palettes, vectorscripts, worksheets.

Parameters:

dialogID Index to the dialog layout that contains the image popup component.
componentID Index to a specific image popup component.
objectName Name of the object to insert.

Result:

Returns an image popup index to the object inserted.

Example:

PROCEDURE dialog1_Main;
VAR
	dialog1 :INTEGER;
	int     :INTEGER;
	str     :STRING;

PROCEDURE dialog1_Handler(VAR item :LONGINT; data :LONGINT);
BEGIN
	CASE item OF
		SetupDialogC:
			BEGIN
				str := GetSDName(FSymDef);
				int := InsertImagePopupObjectItem(dialog1, 4, str);
				SetImagePopupSelectedItem(dialog1, 4, int);
			END;
	END;
END;

BEGIN
	dialog1 := CreateLayout('Image Pop-Up', FALSE, 'OK', '');
	CreateControl(dialog1, 4, 10, '', 0);
	SetFirstLayoutItem(dialog1, 4);
	int := RunLayoutDialog(dialog1, dialog1_Handler);
END;
RUN(dialog1_Main);

See Also:

GetNumImagePopupItems   GetImagePopupObject   GetImagePopupObjectItemIndex   SetImagePopupSelectedItem   GetImagePopupSelectedItem   RemoveImagePopupItem   RemoveAllImagePopupItems  



  InsertImagePopupResource Dialogs - Modern 

Declaration:

FUNCTION   InsertImagePopupResource
(   dialogID :LONGINT;
    componentID :LONGINT;
    listID :LONGINT;
    index :LONGINT
) :LONGINT ;

Description:

Inserts the indicated item of the specified resource list into the indicated image popup and returns the image popup index of the inserted item.

Parameters:

dialogID index to the dialog layout that contains the image popup component.
componentID index to a specific image popup component.
listID an ID for a resource list created by the BuildResourceList function.
index an index into the list.

Example:

{ Add all items in the resource list to the image popup. }
for index:=1 to numItems do
   index := InsertImagePopupResource(dialogID, kImagePopupID, listID,   index);



  InsertImagePopupSeparator Dialogs - Modern 

Declaration:

FUNCTION   InsertImagePopupSeparator
(   liDialogID :LONGINT;
    liComponentID :LONGINT;
    strLabel :STRING
) :INTEGER ;

Description:

Inserts a separator with the specified label at the end of the image popup list.



  InsertProposedClassOrLayerItem Dialogs - Modern 

Declaration:

FUNCTION   InsertProposedClassOrLayerItem
(   nDialogID :LONGINT;
    nComponentID :LONGINT;
    strLabel :STRING;
    nIconIndex :INTEGER
) :BOOLEAN ;

Description:

Inserts a class or layer item in the proposed section of a Class, Design Layer, or Sheet Layer Layout Manager Pull Down.

Example:

PROCEDURE Example;
VAR
   dialog1 :INTEGER;
   result  :INTEGER;
   boo     :BOOLEAN;
   choiceNumber :INTEGER;
   choiceString :STRING;

PROCEDURE Dialog_Handler(VAR item :LONGINT; data :LONGINT);
BEGIN
   CASE item OF
      SetupDialogC:
         BEGIN
            boo := InsertProposedClassOrLayerItem(dialog1, 4, 'New Class Name', 0);
         END;
      1:
         BEGIN
            GetSelChoice(4, 0, choiceNumber, choiceString);
            AlrtDialog(Concat('choiceString: ', choiceString));
         END;
   END;
END;

BEGIN
   dialog1 := CreateLayout('Example Dialog', FALSE, 'OK', 'Cancel');
   CreateClassPullDownMenu(dialog1, 4, 24);
   SetFirstLayoutItem(dialog1, 4);
   result := RunLayoutDialog(dialog1, Dialog_Handler);
END;
RUN(Example);



  InsertTreeControlItem Dialogs - Modern 

Declaration:

FUNCTION   InsertTreeControlItem
(   nDialogID :LONGINT;
    nComponentID :LONGINT;
    strItemLabel :STRING;
    nParentID :INTEGER;
    nAfterID :INTEGER
) :INTEGER ;

Description:

Inserts an item into a Layout Manager tree control.



  IsItemEnabled Dialogs - Modern 

Declaration:

FUNCTION   IsItemEnabled
(   nDialogID :LONGINT;
    nComponentID :LONGINT
) :BOOLEAN ;

Description:

Determines if the specified item is currently enabled.



  IsItemVisible Dialogs - Modern 

Declaration:

FUNCTION   IsItemVisible
(   nDialogID :LONGINT;
    nComponentID :LONGINT
) :BOOLEAN ;

Description:

Determines if the specified item is currently visible.



  NotifyPullDownClicked Dialogs - Modern 

Declaration:

PROCEDURE   NotifyPullDownClicked
(   nDialogID :LONGINT;
    nComponentID :LONGINT
) ;

Description:

Sends an item hit notification when the pull down menu is clicked, allowing developers to dynamically populate the menu.



  RefreshItem Dialogs - Modern 

Declaration:

PROCEDURE   RefreshItem
(   liDialogID :LONGINT;
    liComponentID :LONGINT
) ;

Description:

Refreshes the specified item.



  RemoveAllImagePopupItems Dialogs - Modern 

Declaration:

PROCEDURE   RemoveAllImagePopupItems
(   dialogID :LONGINT;
    componentID :LONGINT
) ;

Description:

Removes all items from the image popup.

Parameters:

dialogID Index to the dialog layout that contains the image popup component.
componentID Index to a specific image popup component.

Example:

RemoveAllImagePopupItems(dialogID, componentID);

See Also:

InsertImagePopupObjectItem   GetNumImagePopupItems   GetImagePopupObject   GetImagePopupObjectItemIndex   SetImagePopupSelectedItem   GetImagePopupSelectedItem   RemoveImagePopupItem  



  RemoveEnhancedPullDownMenuItemRange Dialogs - Modern 

Declaration:

PROCEDURE   RemoveEnhancedPullDownMenuItemRange
(   dialogID :LONGINT;
    componentID :LONGINT;
    iStartItemIndexToRemove :INTEGER;
    iEndItemIndexToRemove :INTEGER
) ;

Description:

Removes the specified range of items from the specified Layout Manager enhanced pull down menu control.



  RemoveGradientSliderSegment Dialogs - Modern 

Declaration:

PROCEDURE   RemoveGradientSliderSegment
(   dialogID :LONGINT;
    componentID :LONGINT;
    segmentIndex :INTEGER
) ;

Description:

Removes the specified segment from the gradient slider.

Note: a gradient slider must always have at least 2 segments.

Parameters:

dialogID Index to the dialog layout that contains the gradient slider component.
componentID Index to a specific gradient slider component.
segmentIndex Index to segment to be removed.
(segment indexes begin with 1)

Example:

RemoveGradientSliderSegment(dialogID, componentID, 4);



  RemoveImagePopupItem Dialogs - Modern 

Declaration:

PROCEDURE   RemoveImagePopupItem
(   dialogID :LONGINT;
    componentID :LONGINT;
    itemIndex :INTEGER
) ;

Description:

Removes the specified item from the image popup.

Parameters:

dialogID Index to the dialog layout that contains the image popup component.
componentID Index to a specific image popup component.
itemIndex Index to item to be removed.

Example:

RemoveImagePopupItem(dialogID, componentID, 4);

See Also:

InsertImagePopupObjectItem   GetNumImagePopupItems   GetImagePopupObject   GetImagePopupObjectItemIndex   SetImagePopupSelectedItem   GetImagePopupSelectedItem   RemoveAllImagePopupItems  



  RemoveListBoxTabStop Dialogs - Modern 

Declaration:

PROCEDURE   RemoveListBoxTabStop
(   dialogID :LONGINT;
    itemID :LONGINT
) ;

Description:

Removes the last tab stop from a Layout Manager list box.

Parameters:

dialogID ID of the dialog
itemID ID of the list box

See Also:

AddListBoxTabStop  



  RemoveTreeControlItem Dialogs - Modern 

Declaration:

FUNCTION   RemoveTreeControlItem
(   nDialogID :LONGINT;
    nComponentID :LONGINT;
    nItemID :INTEGER
) :BOOLEAN ;

Description:

Removes an item from a Layout Manager tree control.



  RunLayoutDialog Dialogs - Modern 

Declaration:

FUNCTION   RunLayoutDialog
(   dialogID :LONGINT;
    callback :PROCEDURE
) :LONGINT ;

Description:

Displays the specified dialog and initiates the dialog event loop. The dialog event loop is specified in a procedure subroutine that is passed as a parameter to the function.

Parameters:

dialogID The index of the dialog to be displayed.
callback The event loop subroutine for the dialog.

Result:

Returns a LONGINT value indicating the button pressed to exit the dialog.



  SelectTreeControlItem Dialogs - Modern 

Declaration:

PROCEDURE   SelectTreeControlItem
(   nDialogID :LONGINT;
    nComponentID :LONGINT;
    nItemID :INTEGER
) ;

Description:

Selects the specified tree control item.



  SetBelowItem Dialogs - Modern 

Declaration:

PROCEDURE   SetBelowItem
(   dialogID :LONGINT;
    srcItemID :LONGINT;
    belowtItemID :LONGINT;
    indent :INTEGER;
    lineSpacing :INTEGER
) ;

Description:

Places the specified control item below a previously inserted control item. Additional positioning can be performed by specifying x- and y-offsets (in pixels) from the initial insert position. Indent is in number of characters. LineSpacing is in pixels.

Parameters:

dialogID The index of the dialog layout being defined.
srcItemID The index of the anchor control item.
belowtItemID The index of the control item being placed.
indent Left-right (x) control offset value.
lineSpacing Up-down (y) control offset value.



  SetColorButton Dialogs - Modern 

Declaration:

PROCEDURE   SetColorButton
(   dialogID :LONGINT;
    itemID :LONGINT;
    red :LONGINT;
    green :LONGINT;
    blue :LONGINT
) ;

Description:

Sets the color of a modern dialog color button. Set all colors to 0 for black. Set all colors to 65535 for white.

Parameters:

dialogID The index of the dialog layout containing the control.
itemID The index of the color button.
red The red component of the color.
green The green component of the color.
blue The blue component of the color.

Example:

PROCEDURE SetColorControl(dialogID, controlID :LONGINT; colorIndex :STRING);
VAR
	r, g, b :LONGINT;
BEGIN
	IF colorIndex <> '' THEN BEGIN
		ColorIndexToRGB(Str2Num(colorIndex), r, g, b);
		SetColorButton(dialogID, controlID, r, g, b);
	END;
END;

See Also:

GetColorButton  



  SetColorChoice Dialogs - Modern 

Declaration:

PROCEDURE   SetColorChoice
(   dialogID :LONGINT;
    itemID :LONGINT;
    colorIndex :INTEGER
) ;

Description:

Sets the choice for the color popup dialog control to the specified color index.

Example:

PROCEDURE Example;
VAR
   dialog1 :INTEGER;
   result  :INTEGER;
PROCEDURE Dialog_Handler(VAR item :LONGINT; data :LONGINT);
BEGIN
   CASE item OF
      SetupDialogC:
         BEGIN
            SetColorChoice(dialog1, 4, 1242);
         END;
      1:
         BEGIN
            GetColorChoice(dialog1, 4, result);
            AlrtDialog(Concat('color index: ', result));
         END;
   END;
END;
BEGIN
   dialog1 := CreateLayout('Example Dialog', FALSE, 'OK', 'Cancel');
   CreateColorPopup(dialog1, 4, 24);
   SetFirstLayoutItem(dialog1, 4);
   result := RunLayoutDialog(dialog1, Dialog_Handler);
END;
RUN(Example);



  SetComponentIndeterminate Dialogs - Modern 

Declaration:

FUNCTION   SetComponentIndeterminate
(   nDialogID :LONGINT;
    nComponentID :LONGINT;
    bIndeterminateState :BOOLEAN
) :BOOLEAN ;

Description:

Determines if the specified Layout Manager attribute control (line, weight, color, etc) should be set to the third, indeterminate state.



  SetComponentSize Dialogs - Modern 

Declaration:

FUNCTION   SetComponentSize
(   nDialogID :LONGINT;
    nComponentID :LONGINT;
    nWidthPixels :INTEGER;
    nHeightPixels :INTEGER
) :BOOLEAN ;

Description:

Sets the width and height of the specified Layout Manager component.



  SetControlData Dialogs - Modern 

Declaration:

PROCEDURE   SetControlData
(   dialogID :LONGINT;
    itemID :LONGINT;
    data :LONGINT
) ;

Description:

Sets the data for the specified extended control item.

In image controls, for example, this call can be used to set the ID of the image resource being displayed.

This function can only be called from within the dialog event handler subroutine.

Parameters:

dialogID The index of the dialog containing the control.
itemID The index of the dialog control item.
data New data for the control item.



  SetControlText Dialogs - Modern 

Declaration:

PROCEDURE   SetControlText
(   DlogID :INTEGER;
    ItemID :INTEGER;
    newtext :STRING
) ;

Description:

Sets the text of radio button, check box, push button controls.

Parameters:

DlogID ID of the dialog
ItemID ID of the control
newtext Text to insert



  SetEdgeBinding Dialogs - Modern 

Declaration:

PROCEDURE   SetEdgeBinding
(   dialogID :LONGINT;
    itemID :LONGINT;
    boundToLeft :BOOLEAN;
    boundToRight :BOOLEAN;
    boundToTop :BOOLEAN;
    boundToBottom :BOOLEAN
) ;

Description:

Binds edges of a dialog control to its parent. This function sets bindings to be fixed. To change any of them to be proportional, use SetProportionalBinding.

See Also:

CreateResizableLayout   SetProportionalBinding  



  SetEditInteger Dialogs - Modern 

Declaration:

PROCEDURE   SetEditInteger
(   dialogID :LONGINT;
    itemID :LONGINT;
    value :LONGINT
) ;

Description:

Sets the numeric value of the specified INTEGER numeric edit field control.

Parameters:

dialogID The index of the dialog layout containing the control.
itemID The index of the control item.
value The new value for the field.



  SetEditReal Dialogs - Modern 

Declaration:

PROCEDURE   SetEditReal
(   dialogID :LONGINT;
    itemID :LONGINT;
    editRealType :LONGINT;
    value :REAL
) ;

Description:

Sets the numeric value of the specified REAL numeric edit field control.

Table - Field Types for EditReal Fields

Index
Field Value
1
REAL value
2
Angular value
3
Dimension
4
X coordinate
5
Y coordinate

Parameters:

dialogID The index of the dialog layout containing the control.
itemID The index of the control item.
editRealType The type of REAL value displayed in the field.
value The new value for the field.



  SetFirstGroupItem Dialogs - Modern 

Declaration:

PROCEDURE   SetFirstGroupItem
(   dialogID :LONGINT;
    groupID :LONGINT;
    firstItemID :LONGINT
) ;

Description:

Places the first item of a layout group into the specified group box control item. The control is inserted in the top left corner of the group box, and all other controls in the group are placed relative to this item.

Parameters:

dialogID The index of the dialog layout being defined.
groupID The index of the group box control accepting the first item.
firstItemID The index of the control item to be placed in the group box.

Example:

SetFirstLayoutItem(lEditID,4);

{inserts the first control in a group box}
SetFirstGroupItem(lEditID,4,5);
	
SetBelowItem(lEditID,4,6,0,0);
SetFirstGroupItem(lEditID,6,7);
SetBelowItem(lEditID,6,8,0,0);



  SetFirstLayoutItem Dialogs - Modern 

Declaration:

PROCEDURE   SetFirstLayoutItem
(   dialogID :LONGINT;
    firstItemID :LONGINT
) ;

Description:

Initializes dialog control layout by placing the specified control item in the top left corner of the layout. All other controls in the layout are positioned relative to the control item placed with this function.

Parameters:

dialogID The index of the dialog layout being defined.
firstItemID The index of the control item to be placed.

Example:

{positions the first control in the dialog}
SetFirstLayoutItem(lEditID,4);

SetFirstGroupItem(lEditID,4,5);	
SetBelowItem(lEditID,4,6,0,0);
SetFirstGroupItem(lEditID,6,7);
SetBelowItem(lEditID,6,8,0,0);



  SetFocusOnItem Dialogs - Modern 

Declaration:

PROCEDURE   SetFocusOnItem
(   liDialogID :LONGINT;
    liComponentID :LONGINT
) ;

Description:

Sets the keyboard input focus on the specified item.



  SetGradientSliderData Dialogs - Modern 

Declaration:

PROCEDURE   SetGradientSliderData
(   dialogID :LONGINT;
    componentID :LONGINT;
  VAR  segmentIndex :INTEGER;
    spotPosition :REAL;
    midpointPosition :REAL;
    red :LONGINT;
    green :LONGINT;
    blue :LONGINT
) ;

Description:

Sets the spot position, midpoint position and color of the specified gradient slider segment.

Note: you must use a variable, initialized to the segment index, to pass as a parameter. After the data has been set, this variable will contain the index of the segment, which may have changed because of the spot position specified.

Parameters:

dialogID Index to the dialog layout that contains the gradient slider component.
componentID Index to a specific gradient slider component.
segmentIndex Segment for which to set the data.
(segment indexes begin with 1)
spotPosition Position of the segment's color marker relative to left-most point of the slider.
(position >= 0.0 and position <= 1.0)
midpointPosition Position of the segment's midpoint marker relative to color marker immediately to left.
(position >= 0.0 and position <= 1.0)
red Red component of the color spot's color.
(red >= 0 and red <= 255)
green Green component of the color spot's color.
(green >= 0 and green <= 255)
blue Blue component of the color spot's color.
(blue >= 0 and blue <= 255)

Example:

segmentIndex := 4;
SetGradientSliderData(dialogID, componentID, segmentIndex, 0.9, 0.5, 255, 255, 255);



  SetGradientSliderSelectedMarker Dialogs - Modern 

Declaration:

PROCEDURE   SetGradientSliderSelectedMarker
(   dialogID :LONGINT;
    componentID :LONGINT;
    segmentIndex :INTEGER;
    markerType :INTEGER
) ;

Description:

Sets the selected marker for the specified gradient slider.

Note: use the number, 1, to specify a color marker and the number, 2, to specify a midpoint marker.

Parameters:

dialogID Index to the dialog layout that contains the gradient slider component.
componentID Index to a specific gradient slider component.
segmentIndex Index to segment in which to select marker.
(segment indexes begin with 1)
markerType Type of marker to select.
(1 = color marker, 2 = midpoint marker)

Example:

SetGradientSliderSelectedMarker(dialogID, componentID, 4, 2);
{ selects midpoint marker in segment with index of 4 }



  SetIconPushButtonState Dialogs - Modern 

Declaration:

FUNCTION   SetIconPushButtonState
(   nDialogID :LONGINT;
    nComponentID :LONGINT;
    bPressed :BOOLEAN
) :BOOLEAN ;

Description:

Retrieves the state of the specified Layout Manager icon push button (pressed or not pressed).



  SetImageControlHandle Dialogs - Modern 

Declaration:

PROCEDURE   SetImageControlHandle
(   dialogID :LONGINT;
    componentID :LONGINT;
    hImage :HANDLE
) ;

Description:

Sets the image definition node handle for the specified Layout Manager image control.



  SetImageControlPath Dialogs - Modern 

Declaration:

FUNCTION   SetImageControlPath
(   nDialogID :LONGINT;
    nComponentID :LONGINT;
    strPath :STRING
) :BOOLEAN ;

Description:

Sets the image control path for the specified layout manager image control. Use with CreateImageControl.



  SetImagePopupSelectedItem Dialogs - Modern 

Declaration:

PROCEDURE   SetImagePopupSelectedItem
(   dialogID :LONGINT;
    componentID :LONGINT;
    itemIndex :INTEGER
) ;

Description:

Sets the selected image popup item. The itemIndex parameter is 1-based.

Parameters:

dialogID Index to the dialog layout that contains the image popup component.
componentID Index to a specific image popup component.
itemIndex Index to item to select.

Example:

SetImagePopupSelectedItem(dialogID, componentID, 4);

See Also:

InsertImagePopupObjectItem   GetNumImagePopupItems   GetImagePopupObject   GetImagePopupObjectItemIndex   GetImagePopupSelectedItem   RemoveImagePopupItem   RemoveAllImagePopupItems  



  SetItemToolTipText Dialogs - Modern 

Declaration:

PROCEDURE   SetItemToolTipText
(   nDialogID :LONGINT;
    nComponentID :LONGINT;
    strToolTip :STRING;
    strSubToolTip :STRING;
    nIndex :INTEGER;
    nSubIndex :INTEGER
) ;

Description:

Sets the tooltip text for list browsers, list boxes, edit controls, pull down menus, and enhanced static text. Parameters nIndex and nSubIndex are used for list browsers and list boxes only.



  SetLayoutDialogPosition Dialogs - Modern 

Declaration:

FUNCTION   SetLayoutDialogPosition
(   dialogID :LONGINT;
    left :INTEGER;
    top :INTEGER
) :BOOLEAN ;

Description:

This function moves the dialog window to the given location. Call this function to override the default automatic positioning of the dialog window. The dialog will be pinned so that it is at least partly onscreen.

This function can be useful for displaying a dialog in a position in which it was placed during prior use.

Parameters:

dialogID Index of the dialog.
left Location of left edge of dialog in pixels.
top Location of top edge of dialog in pixels.

Result:

true - success - the dialog window was moved.
false - failure - the dialog window was not moved, likely because it does not currently exist, or the dialogID is invalid. The dialog window will exist anytime between the Setup message and OK/Cancel message.

See Also:

GetLayoutDialogPosition  



  SetLayoutDialogSize Dialogs - Modern 

Declaration:

PROCEDURE   SetLayoutDialogSize
(   dialogID :LONGINT;
    width :INTEGER;
    height :INTEGER
) ;

Description:

Sets a Layout Manager dialog's size, in pixels.



  SetLayoutOption Dialogs - Modern 

Declaration:

FUNCTION   SetLayoutOption
(   dialogID :LONGINT;
    option :INTEGER;
    value :LONGINT
) :BOOLEAN ;

Description:

Set options for a specific Layout Manager dialog. For use by certain alert dialogs that want centered "OK" button.



  SetLineAttributeData Dialogs - Modern 

Declaration:

PROCEDURE   SetLineAttributeData
(   dialogID :LONGINT;
    itemID :LONGINT;
    lineStyle :INTEGER;
    lineWeight :INTEGER
) ;

Description:

Set current choices for the line attribute dialog control. Both the line style index and the line weight in mils can be specified.



  SetLineStyleChoice Dialogs - Modern 

Declaration:

PROCEDURE   SetLineStyleChoice
(   dialogID :LONGINT;
    itemID :LONGINT;
    lineStyle :INTEGER
) ;

Description:

Set the current choice of the line style popup dialog control to the specified index.



  SetLineWeightChoice Dialogs - Modern 

Declaration:

PROCEDURE   SetLineWeightChoice
(   dialogID :LONGINT;
    itemID :LONGINT;
    lineWeight :INTEGER
) ;

Description:

Set the current choice of the line weight dialog control to the value specified in mils.



  SetMarkerChoice Dialogs - Modern 

Declaration:

PROCEDURE   SetMarkerChoice
(   dialogID :LONGINT;
    itemID :LONGINT;
    index :INTEGER;
    style :INTEGER;
    angle :INTEGER;
    size :REAL
) ;

Special Notes:

SetMarkerChoice is obsolete as of VectorWorks13.0

Description:

OBSOLETE procedure for VW2008

Set current choice for Marker popup dialog control. Index is the standing position of marker; it is -1 for customized, otherwise 1-based index.
Style is the chosen shape of arrow head . Style is zero-based. The angle parameter must be in range 0 to 90 degrees, depending on the style. Size is per Inches. Style, angle and size may be changed by user in VW preferences.
Further, the function can find a specific Index , given the right Style, Angle & Size. In such case index should be set to -1. If the given properties correspond to one of indecies, then -1 is replaced with that specific index.
When using pre-defined arrow heads, style & angle & size may be passed zero and just fill in the proper index to set the current.

Example:

PROCEDURE dialog1_Main;
VAR
	int, dialog1   :INTEGER;
	index, style, angle, size :INTEGER;

PROCEDURE dialog1_Handler(VAR item :LONGINT; data :LONGINT);
BEGIN
	CASE item OF
		SetupDialogC:
			BEGIN
				index := 1;
				style := 2;
				angle := 3;
				size  := 4;
				SetMarkerChoice(dialog1, 4, index, style, angle, size);
			END;
		5: 
			BEGIN
				GetMarkerChoice(dialog1, 4, index, style, angle, size);
				AlrtDialog(Concat('index: ', index, Chr(13), 'style: ', style, Chr(13), 'angle: ', angle, Chr(13), 'size: ', size));
			END;
	END;
END;

BEGIN
	dialog1 := CreateLayout('Test', False, 'OK', '');
	CreateMarkerPopup(dialog1, 4);
	CreatePushButton(dialog1, 5, '  Display Values  ');
	SetFirstLayoutItem(dialog1, 4);
	SetBelowItem(dialog1, 4, 5, 0, 2);
	int := RunLayoutDialog(dialog1, dialog1_Handler);
END;
RUN(dialog1_Main);

See Also:

GetMarkerChoice  



  SetMarkerValue Dialogs - Modern 

Declaration:

PROCEDURE   SetMarkerValue
(   dialogID :LONGINT;
    itemID :LONGINT;
    style :INTEGER;
    angle :INTEGER;
    length :REAL;
    width :REAL;
    basis :INTEGER;
    thickness :REAL
) ;

Description:

Sets MarkerPopup value in dialog (replaces MarkerPopup procedures prior to VW2008).

Parameters:

dialogID ID of the dialog
itemID ID of the marker popup control
style Marker Style
angle Marker Angle
length Marker Length (In Inches)
width Marker Width (In Inches)
basis Marker Thickness Basis
thickness Marker Thickness

Example:

PROCEDURE Example;
VAR
   int, dialogID   :INTEGER;
   style, angle, thicknessBasis :INTEGER;
   width, length, thickness :REAL;

PROCEDURE Dialog_Handler(VAR item :LONGINT; data :LONGINT);
BEGIN
   CASE item OF
      SetupDialogC:
         BEGIN
            style := 130;
            angle := 0;
            width  := .125;
		length := .125;
		thickness := 0;
		thicknessBasis := 0;
            SetMarkerValue(dialogID, 4, style, angle, width, length, thicknessBasis, thickness);
         END;
      5: 
         BEGIN
           GetMarkerValue(dialogID, 4, style, angle, width, length, thicknessBasis, thickness);

            AlrtDialog(Concat(
               'style: ', style, Chr(13), 
               'angle: ', angle, Chr(13), 
		 'width: ', width,Chr(13),
               'length: ', length, Chr(13),
		  'thickness: ', thickness, Chr(13),
		  'thicknessBasis: ', thicknessBasis));

         END;
   END;
END;

BEGIN
   dialogID := CreateLayout('Test', False, 'OK', '');
   CreateMarkerPopup(dialogID, 4);
   CreatePushButton(dialogID, 5, '  Display Values  ');
   SetFirstLayoutItem(dialogID, 4);
   SetBelowItem(dialogID, 4, 5, 0, 2);
   int := RunLayoutDialog(dialogID, Dialog_Handler);
END;
RUN(Example);

See Also:

GetMarkerValue  



  SetPatternData Dialogs - Modern 

Declaration:

PROCEDURE   SetPatternData
(   dialogID :LONGINT;
    itemID :LONGINT;
    patternIndex :INTEGER;
    foreColor :INTEGER;
    backColor :INTEGER
) ;

Description:

Set current choice and colors for the pattern popup dialog control.



  SetProportionalBinding Dialogs - Modern 

Declaration:

PROCEDURE   SetProportionalBinding
(   dialogID :LONGINT;
    itemID :LONGINT;
    leftProportional :BOOLEAN;
    rightProportional :BOOLEAN;
    topProportional :BOOLEAN;
    bottomProportional :BOOLEAN
) ;

Description:

Sets a dialog control's bindings to be proportional. Proportional bindings maintain a distance that is a ratio of the initial position to the width (or height, as appropriate) of the parent. To change a control's bindings to be fixed, use SetEdgeBinding.

See Also:

CreateResizableLayout   SetEdgeBinding  



  SetRightItem Dialogs - Modern 

Declaration:

PROCEDURE   SetRightItem
(   dialogID :LONGINT;
    srcItemID :LONGINT;
    rightItemID :LONGINT;
    indent :INTEGER;
    lineSpacing :INTEGER
) ;

Description:

Places the specified control item to the right of a previously inserted control item.
Additional positioning can be performed by specifying x- and y-offsets (in pixels) from the initial insert position.

Parameters:

dialogID The index of the dialog layout being defined.
srcItemID The index of the anchor control item.
rightItemID The index of the control item being placed.
indent Left-right (x) control offset value.
lineSpacing Up-down (y) control offset value.



  SetSelectionRange Dialogs - Modern 

Declaration:

PROCEDURE   SetSelectionRange
(   dialogID :LONGINT;
    controlID :LONGINT;
    startPos :INTEGER;
    endPos :INTEGER
) ;

Description:

Sets the range of the current selection for the specified control.



  SetThreeStateCheckBoxState Dialogs - Modern 

Declaration:

PROCEDURE   SetThreeStateCheckBoxState
(   dialogID :LONGINT;
    componentID :LONGINT;
    iState :INTEGER
) ;

Description:

Sets the state of a Layout Manager three state checkbox.



  SetTreeControlItemData Dialogs - Modern 

Declaration:

PROCEDURE   SetTreeControlItemData
(   nDialogID :LONGINT;
    nComponentID :LONGINT;
    nItemID :INTEGER;
    nUserData :LONGINT
) ;

Description:

Sets the user data of the specified item from a tree control.



  SetVSResourceFile Dialogs - Modern 

Declaration:

FUNCTION   SetVSResourceFile
( fileName:STRING ) :BOOLEAN ;

Description:

Sets the active resource file for a script. The resource file is opened for the duration of script execution.

The name of the resource file should be specified without the file extension.

Parameters:

fileName The name of the resource file to be opened.

Result:

A BOOLEAN value indicating the success of the file open operation.

See Also:

GetResourceString  



  ShowEnhancedPullDownMenuGroupIcon Dialogs - Modern 

Declaration:

PROCEDURE   ShowEnhancedPullDownMenuGroupIcon
(   liDialogID :LONGINT;
    liComponentID :LONGINT;
    bShowGroupIcon :BOOLEAN
) ;

Description:

Determines if the group icon should be shown in the specified enhanced pull down menu.



  ShowItem Dialogs - Modern 

Declaration:

PROCEDURE   ShowItem
(   dialogID :LONGINT;
    item :INTEGER;
    show :BOOLEAN
) ;

Description:

Sets the visibility of the referenced dialog control.

Parameters:

dialogID ID of the currently executing dialog.
item Item ID of dialog control to show or hide.
show New visibility state of dialog control.

Example:

PROCEDURE dialogID_Main;
VAR
	dialogID :INTEGER;

PROCEDURE dialogID_Setup;
BEGIN
	dialogID := CreateLayout('Example Dialog', FALSE, 'OK', 'Cancel');
	CreateRadioButton (dialogID,  4,  'Option One');
	CreateEditReal    (dialogID,  5,  1, 0.0, 16);
	CreateRadioButton (dialogID,  6,  'Option Two');
	CreateEditReal    (dialogID,  7,  1, 0.0, 16);
	SetFirstLayoutItem(dialogID,  4);
	SetRightItem      (dialogID,  4,   5,  0, 0);
	SetBelowItem      (dialogID,  4,   6,  0, 0);
	SetRightItem      (dialogID,  6,   7,  0, 0);
END;

PROCEDURE dialogID_Handler(VAR item :LONGINT; data :LONGINT);
BEGIN
	CASE item OF
		SetupDialogC:
			BEGIN
				SetItem(4, TRUE);
				ShowItem(dialogID, 7, FALSE);
			END;
		 4:
			BEGIN
				ShowItem(dialogID, 5, TRUE);
				ShowItem(dialogID, 7, FALSE);
			END;
		 6:
			BEGIN
				ShowItem(dialogID, 7, TRUE);
				ShowItem(dialogID, 5, FALSE);
			END;
	END;
END;

BEGIN
	dialogID_Setup;
	IF RunLayoutDialog(dialogID, dialogID_Handler) = 1 then BEGIN
	END;
END;
RUN(dialogID_Main);



  UpdateSymbolDisplayControl Dialogs - Modern 

Declaration:

PROCEDURE   UpdateSymbolDisplayControl
(   dialogID :LONGINT;
    itemID :LONGINT;
    symbolName :STRING;
    renderMode :INTEGER;
    view :INTEGER
) ;

Description:

Updates a pre-existing symbol display control in the dialog with a new symbol, rendering mode, or view. The dialog ID and item ID must refer to symbol display control created with CreateSymbolDisplayControl. To show a blank SymbolDisplay control, use an empty string as the symbolName parameter.

Table - Render Modes

Render Mode Constant
Wireframe 0
Unshaded Polygon 2
Shaded Polygon 3
Shaded Polygon No Lines 4
Final Shaded Polygon 5
Hidden Line 6
Dashed Hidden Line 7
OpenGL 11
Fast RenderWorks 12
Fast RenderWorks with Shadows 13
Final Quality RenderWorks 14
Custom RenderWorks 15
Artistic RenderWorks 17
Sketch 18


Table - Views

View Constant
Top/Plan 2
Front 3
Back 4
Left 5
Right 6
Top 7
Bottom 8
Right Isometric 9
Left Isometric 10
Right Rear Isometric 11
Left Rear Isometric 12
Bottom Right Isometric 13
Bottom Left Isometric 14
Bottom Right Rear Isometric 15
Bottom Left Rear Isometric 16

Parameters:

dialogID The ID of the dialog in which to create the control.
itemID The item ID of the control.
symbolName The name of the symbol to display.
renderMode The render mode in which to display the symbol.
view The standard view in which to display the symbol.

Example:

CreateSymbolDisplayControl( 5, 6, 'Chair', 350, 200, 5, 11, 9 );
{Other code}
UpdateSymbolDisplayControl( 5, 6, 'Chair', 0, 3 );

This creates a dialog control that displays the symbol called "Chair."  The control is 350 pixels high and 200 pixels wide, with a margin of 5 pixels.  The symbol is rendered in OpenGL mode and displayed in a right isometric view.  It then later updates the control to display the same symbol rendered in Wireframe in a front view.

See Also:

CreateSymbolDisplayControl  



  VerifyLayout Dialogs - Modern 

Declaration:

FUNCTION   VerifyLayout
( dialogID:LONGINT ) :BOOLEAN ;

Description:

Checks a specified dialog layout for correct layout definition.

Parameters:

dialogID The index of the dialog layout to be verified.

Result:

Returns FALSE if a problem was encountered defining the dialog, otherwise returns TRUE.

Example:

{verify the dialog layou is properly constructed}
	dialogOK := VerifyLayout(lEditID);

	IF (dialogOK & rsAvailable) THEN
	BEGIN
		lmtestResult := RunLayoutDialog(lEditID,DriveSplashDialog);
	END;