VS:CreateStyledStatic

From Vectorworks Developer
Revision as of 14:25, 12 August 2013 by Root (talk | contribs) (1 revision)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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

Description

Creates a new static text field control in a dialog layout. Text will have the indicated style.


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

0 = eStaticTextTypeRegular
1 = eStaticTextTypeCaption
2 = eStaticTextTypeBold,
3 = eStaticTextTypeReduced

PROCEDURE CreateStyledStatic(
dialogID :LONGINT;
componentID :LONGINT;
text :STRING;
widthInCharacters :INTEGER;
style :INTEGER);
def vs.CreateStyledStatic(dialogID, componentID, text, widthInCharacters, style):
    return BOOLEAN

Parameters

dialogID LONGINT
componentID LONGINT
text STRING
widthInCharacters INTEGER
style INTEGER Type of this static text control. One of:

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);
   CreateStyledStatic(dialog1, 5, 'default text', 16, 2);
   SetFirstLayoutItem(dialog1, 4);
   SetBelowItem(dialog1, 4, 5, 0, 0);
   result := RunLayoutDialog(dialog1, Dialog_Handler);
END;
RUN(Example);

Version

Availability: from Vectorworks 2013

See Also

VS Functions:

VS:CreateStaticText

VS Functions: [[VS:CreateStaticText]]