VS:InsertEnhancedPullDownMenuItem

From Vectorworks Developer
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

.VectorScript|VectorScript ..VS:Function Reference|Function Reference ..VS:Function_Reference_Appendix|Appendix

Description

DEPRECATED after Vectorworks2012. See InsertEnhanPullDownMenuItem for a replacement.

Inserts the item into the specified Layout Manager created with CreateEnhancedPullDownMenu

FUNCTION InsertEnhancedPullDownMenuItem(
dialogID :LONGINT;
componentID :LONGINT;
strName :STRING;
iIconID :INTEGER) : INTEGER;
def vs.InsertEnhancedPullDownMenuItem(dialogID, componentID, strName, iIconID):
    return INTEGER

Parameters

dialogID LONGINT
componentID LONGINT
strName STRING
iIconID INTEGER

Example

VectorScript

PROCEDURE CreateControlsTest;
CONST

    { control IDs}
    kCreateEnhancedPullDownMenu          = 20;

VAR
    dialog            :INTEGER;

PROCEDURE Dialog_Handler(VAR item :LONGINT; data :LONGINT);
VAR
result : INTEGER;
            
BEGIN
    CASE item OF
        SetupDialogC: BEGIN

            result := InsertEnhancedPullDownMenuItem( dialog, kCreateEnhancedPullDownMenu, 'kCreateEnhancedPullDownMenu choice', 128 );

        END;
    END;
END;


BEGIN
    dialog := CreateLayout( 'InsertEnhancedPullDownMenuItem Test', TRUE, 'OK', 'Cancel' );

    {create controls}
    CreateEnhancedPullDownMenu( dialog, kCreateEnhancedPullDownMenu, 24, TRUE );

    {set relations}
    SetFirstLayoutItem( dialog, kCreateEnhancedPullDownMenu );

    IF RunLayoutDialog( dialog, Dialog_Handler ) = 1 then BEGIN
    END;

END;
RUN( CreateControlsTest );

Python


Version

Availability: from VectorWorks12.5

Deprecated: Vectorworks 2012