4D v17

Using 4D Write Pro standard actions

Home

 
4D v17
Using 4D Write Pro standard actions

Using 4D Write Pro standard actions    


 

The user interface of 4D Write Pro areas can be handled through a wide set of standard actions. Standard actions can be assigned to:

  • menu commands, available through the menu bar or the Dynamic pop up menu command
  • list items, pop-up/drop-down lists, hierarchical pop-up menus,
  • buttons, check boxes,
  • or executed by the INVOKE ACTION command.

When assigned to interface objects, standard actions handle the activation/disabling of the object depending on the context. For more information, please refer to the Standard actions section.

Two kinds of actions are available for 4D Write Pro areas:

  • 4D Write Pro specific actions, that can be used only with 4D Write Pro areas,
  • Other actions, including fonts, expressions, spell check, and editing actions, that can be used with 4D Write Pro areas and other 4D areas (see Standard actions).

The following standard actions are available with 4D Write Pro areas.

Notes:

  • 4D Write Pro actions do not have any corresponding constants.
  • Actions that display an automatic menu/list can only be attached to menu commands, pop-up/drop-down lists or hierarchical pop-up menus objects (see *).
  • Check boxes and 3D check boxes should be associated with status actions, such as "section/differentFirstPage" or "visibleHorizontalRuler". Three-states option is supported with standard check boxes only.
  • A section action status is always equal to the selected section actual status (inherited status if attribute is inherited from parent section or from default attribute) as it must reflect the selected section status (the status which is applied currently to the section). However, modifying a section attribute with a standard action will only override the selected section attribute.

(*) Submenu: When used without any parameters and associated to a menu command, a pop-up/drop-down list or a hierarchical pop-up menu object, these actions display an automatic submenu/list. For example, if you assign the "backgroundColor" action to a menu command, selecting this menu command at runtime will display the Background color submenu items. If you assign the "zoom" action to a hierarchical pop-up menu, it will automatically contain a list of predefined zoom values. Note that these actions cannot be assigned to buttons.

(**) showDialog: Adding the "/showDialog" string to the action name allows the display of the associated standard dialog box for the action. For example, you can use "paragraph/styleSheet/showDialog" to open the input dialog allowing the entry of a new stylesheet name.
 

ActionDocumentParagraphImageSectionHeaderFooterSubmenu(*)showDialog(**)
anchorHorizontalAlignXX
anchorLayoutXX
anchorOriginXX
anchorPageXX
anchorSectionXX
anchorVerticalAlignXX
avoidPageBreakInsideEnabledX
backgroundXXXXXXX
backgroundColorXXXXXXXX
backgroundClipXXXXXXX
backgroundImageXXXXXXXX
backgroundOriginXXXXXXX
backgroundPositionHXXXXXXX
backgroundPositionVXXXXXXX
backgroundRepeatXXXXXXX
backgroundSizeHXXXXXXX
backgroundSizeVXXXXXXX
bookmarkX
borderCollapseX
borderColorXXXXXXXX
borderRadiusXXXXXXX
bordersXXXXXXX
borderStyleXXXXXXX
borderWidthXXXXXXX
columnCountXXX
columnRuleColorXXXX
columnRuleStyleXXX
columnRuleWidthXXX
columnsXXX
columnSpacingXXX
deleteStyleSheetXXX
directionXX
docXX
dpiX
fontStyleWriteX
fontSubscriptX
fontSuperscriptX
footerX
footer/removeX
headerX
header/removeX
htmlWYSIWIGEnabledX
imageXX
image/heightXX
image/verticalAlignXX
insertColumnBreakXX
insertImageX
insertPageBreakX
insertSectionBreakX
lineHeightXX
listStartNumberX
listStyleImageX
listStyleTypeXX
marginXXXXXXX
mergeX
minHeightXXX
minWidthXXX
moveToFrontX
moveToBackX
newLineStyleSheetXX
paddingXXXXXXX
pageModeX
pageOrientationXX
pageSizeX
paragraphXX
printX
refreshImagesX
sectionXX
section/differentFirstPageX
section/differentLeftRightPagesX
section/name/showDialogXX
section/resetX
splitX
styleSheetXXXX
styleSheetsXXX
textAlignX
textIndentX
textLinethroughX
textLinethroughColorXX
textLinethroughStyleX
textShadowX
textShadowColorXX
textShadowOffsetX
textTransformX
textUnderlineX
textUnderlineColorXX
textUnderlineStyleX
updateStyleSheetXXX
userUnitX
verticalAlignXX
visibleBackgroundXXXXXX
viewX
visibleFootersX
visibleHeadersX
visibleHiddenCharsX
visibleHorizontalRulerX
visiblePageFramesX
widowAndOrphanControlEnabledX
widthXXX
zoomXX

Syntax: anchorHorizontalAlign?value={left | center | right}

Defines the horizontal alignment of the image, relative to the anchorOrigin for images in page, or to the layout box for images in embedded mode. This action will reset the horizontal offset to 0. (not enabled for inline images).

Syntax: anchorLayout?value={inline | front | behind}

Defines the anchor layout type for an image. May be used to transform an inline image to an anchored image in front of or behind text, or the reverse. Note: if an image is moved from front/behind text to inline, the image is inserted at the beginning of the current selected text.

Syntax: anchorOrigin?value={paper-box | header-box | footer-box}

Defines the area relative to the absolute position of an anchored image. If an image is relative to the header-box/footer-box which is not visible on a page, the image is not displayed. This action will reset horizontal and vertical offsets to 0.
Page mode only, not enabled for inline images.

Syntax: anchorPage?value={all | current | currentSubSection}

Defines the page(s) where the selected image is displayed (not enabled for inline images).
Page mode only.

Syntax: anchorSection?value={all | current}

Defines the section(s) where the selected image is displayed. (not enabled for inline images).
Page mode only.

Syntax: anchorVerticalAlign?value={top | center | bottom}

Defines the vertical alignment of the image, relative to the anchorOrgin for images in page, or to the layout box for images in embedded mode. This action will reset the vertical offset to 0 (not enabled for inline images).

Syntax: avoidPageBreakInsideEnabled

Allows/disallows page break inside paragraphs.

Syntax: {doc | paragraph | image | section | header | footer}/background

For menu commands only. Default submenu for all background attributes.

Syntax: {doc | paragraph | image | section | header | footer}/backgroundClip?value={paper-box | border-box | padding-box | content-box}

Changes target background clipping box (default target is paragraph). Paper-box targets document and section only.

Syntax: {doc | paragraph | image | section | header | footer}/backgroundColor?value={<Css_color> | transparent}

Changes target background.

Syntax: {doc | paragraph | image | section | header | footer}/backgroundImage?value=none

Clears target background image. (default target is paragraph)

Syntax: {doc | paragraph | image | section | header | footer}/backgroundOrigin?value={paper-box | border-box | padding-box | content-box}

Changes target background image origin box (default target is paragraph). Paper-box targets document and section only.

Syntax: {doc | paragraph | image | section | header | footer}/backgroundPositionH?value={left | right | center}

Changes target background image horizontal alignment (default target is paragraph).
Ex: paragraph/backgroundPositionH?value=left

Syntax: {doc | paragraph | image | section | header | footer}/backgroundPositionV?value={top | bottom | center}

Changes target background image vertical alignment (default target is paragraph).
Ex: paragraph/backgroundPositionV?value=top

Syntax: {doc | paragraph | image | section | header | footer}/backgroundRepeat?value={no-repeat | repeat | repeat-x | repeat-y}

Changes target background image repeat mode. (default target is paragraph)

Syntax: {doc | paragraph | image | section | header | footer}/backgroundSizeH?value={<Css_length> | <Css_percentage> | auto | cover | contain}

Changes target background image width (default target is paragraph).
Ex: paragraph/backgroundSizeH?value=100%. section/backgroundSizeH?value=cover

Syntax: {doc | paragraph | image | section | header | footer}/backgroundSizeV?value={<Css_length> | <Css_percentage> | auto}

Changes target background image height (default target is paragraph).
Ex: paragraph/backgroundSizeV?value=50%. Ex: section/backgroundSizeV?value=40pt

Syntax: bookmark?index=<number>

Selects the Nth bookmark.
Ex: bookmark?index=2 // selects the second bookmark

Syntax: borderCollapse

Collapses selected paragraph borders and interior margins.

Syntax: {doc | paragraph | image | section | header | footer/}{inside | outside/}{borderColor | borderColorLeft | borderColorRight | borderColorTop | borderColorBottom | borderColorLeftRight | borderColorTopBottom}?value=<Css_color>

Changes target border color (default target is paragraph).
Ex: paragraph/borderColorLeft?value=green

Syntax: {doc | paragraph | image | section | header | footer}/borderRadius?value=<Css_length>

Changes target border radius (default target is paragraph).
Ex: paragraph/borderRadius?value=4pt

borders  

Syntax: {doc | paragraph | image | section | header | footer/}{inside | outside/}borders

Default submenu for target borders.

Syntax: {doc | paragraph | image | section | header | footer/}{inside | outside/}{borderStyle | borderStyleLeft | borderStyleRight | borderStyleTop | borderStyleBottom | borderStyleLeftRight | borderStyleTopBottom}?value={none | hidden | dotted | dashed | solid | double | groove | ridge | inset | outset}

Changes target border style (default target is paragraph).
Ex: paragraph/borderStyleLeft?value=double. Ex: outside/borderStyle?value=solid //set selected paragraphs exterior borders to style solid. Ex: inside/borderStyle?value=none //remove selected paragraphs interior borders

Syntax: {doc | paragraph | image | section | header | footer/}{inside | outside/}{borderWidth | borderWidthLeft | borderWidthRight | borderWidthTop | borderWidthBottom | borderWidthLeftRight | borderWidthTopBottom}?value=<Css_length>

Changes target border width (default target is paragraph).
Ex: paragraph/borderWidthLeft?value=4pt

Syntax: {section/}columnCount?value={1<=number<=20}

Number of columns in the current document and/or section.
Ex: section/columnCount?value=3

Syntax: {section/}columnRuleColor?value={CSS color}

Color for the decorative line between document or section columns.
Ex: columnRuleColor?value="#FFFFFF"

Syntax: {section/}columnRuleStyle?value={none | dotted | dashed | solid | double | groove | ridge | inset | outset}

Style for the decorative line between document or section columns.
Ex: columnRuleStyle?value="solid"

Syntax: {section/}columnRuleWidth?value={CSS length}

Width of the decorative line between document or section columns.
Ex: columnRuleWidth?value="2pt"

columns  

Syntax: {section/}columns

Only for a menu item: creates automatically a complete Columns sub-menu with all column actions sub-menus (except insertColumnBreak)

Syntax: {section/}columnSpacing?value={CSS length}

Space between two columns in the current document and/or section.
Ex: columnSpacing?value="1cm"

Syntax: {paragraph | image}/deleteStyleSheet?index={1<= number <= number of target style sheets}

Removes the Nth stylesheet from the stored stylesheets for the selected target (default target is paragraph). Menu item name is replaced at runtime with style sheet name.

Syntax: direction?value={ltr | rtl}

Paragraph direction.

doc  

Syntax: doc

Default submenu for document body layout (embedded mode attributes or default attributes for sections – but for margin which is reserved for embedded mode only).

dpi  

Syntax: Modifies the dpi of the current view (independent of the document attribute wk dpi used internally for pixel conversion <-> points).

Change view dpi.
Ex: dpi?value=72

Syntax: fontStyleWrite

For menu commands only. Displays default font styles submenu for 4D Write Pro.

Syntax: fontSubscript

Toggles subscript font attribute.

Syntax: fontSuperscript

Toggles superscript font attribute.

footer  

Syntax: footer

Displays the Footer submenu.

Syntax: footer/remove

Removes the selected footer.

header  

Syntax: header

Displays the Header submenu.

Syntax: header/remove

Removes the selected header.

Syntax: htmlWYSIWIGEnabled

Toggles between html wysiwyg mode.

image  

Syntax: image

Displays image layout submenu.

Syntax: image/height?value={<Css_length> | auto}

Target height (only supported for image).
Ex: image/height?value=50pt. For image/width, see width.

Syntax: image/verticalAlign?value={top | middle | bottom | baseline | super | sub}

Image vertical alignment.
Ex: image/verticalAlign?value=super

Syntax: insertImage

Opens a picture selection dialog box and inserts the selected picture (if any) as a character in the area.

Syntax: insertColumnBreak

Inserts a column break at the selection.

Syntax: insertPageBreak

Inserts a page break at the selection.

Syntax: insertSectionBreak

Inserts a section break at the selection.

Syntax: lineHeight?value={<Css_length> | <Css_percentage>}

Paragraph line height.
Ex: lineHeight?value=120%

Syntax: listStartNumber?value={<number> (longint) | auto}

List start number.
Ex: listStartNumber?value=10

Syntax: listStyleImage/showDialog

Opens a file dialog to choose a image to display as list style bullet; it will set also list style type to disc – style to be used if image is not found.

Syntax: listStyleType?value={none | disc | circle | square | hollow-square | diamond | club | decimal | decimal-leading- zero | lower-latin | lower-roman | upper-latin | upper-roman | lower-greek | decimal-greek | armenian | georgian | hebrew | hiragana | katakana | cjk-ideographic}

Paragraph list style type.

margin  

Syntax: {doc | paragraph | image | section | header | footer/}{inside | outside/}{margin | marginLeft | marginRight | marginTop | marginBottom | marginLeftRight | marginTopBottom}?value={<Css_length> | auto}

Changes target margin (default target is paragraph).
Ex: margin?value=4pt //sets all paragraph margins to 4pt.
Ex: outside/margin?value=4pt //set exterior paragraph margins to 4pt.
Ex: doc/marginLeft?value=1cm //sets left margin to 1cm for the document as used in embedded mode.
Ex: section/marginLeft?value=1cm //sets left margin to 1cm for the pages of the first selected section

merge  

Syntax: merge

Merges paragraphs.

Syntax: {paragraph | image}/minHeight?value=<Css_length>

Target min height (default target is paragraph).
Ex: paragraph/minHeight?value=50pt

Syntax: {paragraph | image}/minWidth?value=<Css_length>

Target min width (default target is paragraph).
Ex: paragraph/minWidth?value=50pt

Syntax: moveToBack

Moves image to the back. (not enabled for inline images)

Syntax: moveToFront

Moves image to the front. (not enabled for inline images)

Syntax: newLineStyleSheet?index={1<=number<=number of paragraph stylesheets | newLineStyleSheet?value=auto

Selected paragraph elements will use Nth stylesheet as stylesheet to use for new paragraphs created on Return or while splitting paragraphs; If value=auto, new paragraphs will use the same stylesheet (default). (menu item name is replaced at runtime with stylesheet name)

padding  

Syntax: {doc | paragraph | image | section | header | footer/}{inside | outside/}{padding | paddingLeft | paddingRight | paddingTop | paddingBottom | paddingLeftRight | paddingTopBottom }?value=<Css_length>

Changes target padding. (default target is paragraph)

Syntax: pageMode?value={embedded | page | draft}

Changes view mode. Ex: pageMode?value=page

Syntax: {section/}pageOrientation?value={landscape | portrait}

Changes document or first selected section page orientation (if section is not specified, it will apply to all sections otherwise to the first selected section).
Ex: pageOrientation?value=portrait //change orientation to portrait for the whole document.
Ex: section/pageOrientation?value=landscape //change orientation to landscape for the first selected section

Syntax: pageSize?index=<number>

Changes document page size: number is Nth page size in the list of available pages sizes in the current printer.
Ex: pageSize?index=1

Syntax: paragraph

Default submenu for paragraph layout.

print  

Syntax: print

Prints document as rendered in page mode with view settings of the focused 4D Write Pro area.

Syntax: refreshImages

Reloads images from the network for images with URLs.

section  

Syntax: section

Default submenu for page layout for the first selected section.

Syntax: section/differentFirstPage

Section has different first page or not.

Syntax: section/differentLeftRightPages

Section has different left and right pages or not.

Syntax: section/name/showDialog

Displays a dialog allowing to enter the first selected section name.

Syntax: section/reset

Resets all first selected section attributes to default attributes - which are inherited from doc attributes for background, border and padding (same as for embedded mode) and 2.5cm for page margins. First selected section column properties are also removed (so only default section properties will apply).

split  

Syntax: split

Splits paragraphs.

Syntax: {paragraph | image}/styleSheet?value={1<=number<=number of target style sheets}

Applies Nth stylesheet to the selected target elements. With dialog, new stylesheet will use current attributes from the first selected target. (default target is paragraph)
Ex: styleSheet?value=1 //apply first paragraph style sheet to the selected paragraphs and set it as paragraph stylesheets.

Syntax: {paragraph | image}/styleSheets

Default submenu for editing target stylesheets.

Syntax: textAlign?value={left | right | center | justify | initial}

Paragraph text alignment (initial=use right for rtl or left for ltr direction).

Syntax: textIndent?value=<Css_length> (may be negative)

Opens paragraph text indentation (first line indentation).
Ex: textIndent?value=2cm

Syntax: textLinethrough

For menu commands only. Linethrough submenu (with style and color).

Syntax: textLinethroughColor?value={<Css_color> | currentColor}

Ex: textLinethroughColor?value=red

Syntax: textLinethroughStyle?value={none | solid | dotted | dashed | double | semi-transparent | word}

Ex: textLinethroughStyle?value=dotted

Syntax: textShadow

For menu commands only. Default submenu for text shadow (with color and offset).

Syntax: textShadowColor?value={<Css_color> | none}

Changes shadow status or color for characters.
Ex: textShadowColor?value=green

Syntax: textShadowOffset?value=<Css_length>

Only length in pt is supported.
Ex: textShadowOffset?value=2pt

Syntax: textTransform?value={none | capitalize | uppercase | lowercase | small-uppercase}

Formats text.
Ex: textTransform?value=capitalize

Syntax: textUnderline

For menu commands only. Underline submenu (with style and color)

Syntax: textUnderlineColor?value={<Css_color> | currentColor}

Ex: textUnderlineColor?value=red

Syntax: textUnderlineStyle?value={none | solid | dotted | dashed | double | semi-transparent | word}

Ex: textUnderlineStyle?value=dotted

Syntax: {paragraph | image}/updateStyleSheet

Updates first selected target stylesheet with first selected target current attributes (default target is paragraph)

Syntax: userUnit?value={cm | mm | in | pt}

Changes document layout unit (will be reflected on rulers).

Syntax: verticalAlign?value={top | middle | bottom}

Paragraph vertical alignment.
Ex: verticalAlign?value=top. The effect depends on the minHeight value of the paragraph.

view  

Syntax: view

For menu commands only. Default submenu for view settings.

Syntax: visibleBackground

Shows/hides background.

Syntax: visibleFooters

Shows/hides footers.

Syntax: visibleHeaders

Shows/hides headers.

Syntax: visibleHiddenChars

Shows/hides hidden characters

Syntax: visibleHorizontalRuler

Shows/hides horizontal ruler.

Syntax: visiblePageFrames

Shows/hides page frames.

Syntax: widowAndOrphanControlEnabled

Toggles between widow and orphan control mode.

width  

Syntax: {paragraph | image}/width?value=<Css_length> | auto

Target width (only supported for paragraph and image - default target is paragraph).
Ex: image/width?value=50pt

zoom  

Syntax: zoom?value={25% <= percentage in Css <= 400%}

Changes document view zoom.
Ex: zoom?value=120%

Several other standard actions are available in 4D forms and can be used in 4D Write Pro areas:

 
 



See also 


 
PROPERTIES 

Product: 4D
Theme: Using 4D Write Pro standard actions

 
HISTORY 

New
Created: 4D v16 R3
Modified: 4D v16 R4
Modified: 4D v16 R6
Modified: 4D v17

 
ARTICLE USAGE

4D Write Pro Reference ( 4D v17)