EditOptions, Readonly

<< Click to Display Table of Contents >>

Navigation:  Programming > User Interface > Modify the look and feel of the editor >

EditOptions, Readonly

The properties EditOptions and EditOptionsEx control how the editor works. They are also used to disable certain actions, such as table resizing. The property Readonly will completely disable editing.

 

Note: If you need temporary protection of the text, maybe only in certain text layers, such as header and footer, you can use the event BeforeChange to abort any changing operation.

 

TWPEditOptions = set of

   (wpTableResizing, // Move  left right indent }

   wpTableOneCellResizing, // always only one cell, can be switched with CTRL key

  wpTableColumnResizing, // change column width

  wpTableRowResizing, // Change height of row. Also see EditOptionEx: wpTableRowResizingWithCTRL

  wpClearAttrOnStyleChange, // should be ON: clear the redundant properties when the style name is changed.

   wpNoAutoWordSelection, //  don't select complete words (like Word)

   wpObjectMoving, // move images  (ObjType=wpobjImage)

   wpObjectResizingWidth, // the width of objects can be changed

   wpObjectResizingHeight, // the height of objects can be changed

   wpObjectResizingKeepRatio, // the width/height of objects can be changed

  wpObjectSelecting, // objects can be selected

   wpObjectDeletion, // objects can be deleted (only used for TWPObject)

   wpNoAutoScroll, // Switch off the new Auto Scroll Feature

   // obsolete! wpFieldObjectsAsGraphicObjects, { work with TWPOFieldObject as if they were TWPOGraphics }

   wpSpreadsheetCursorMovement, { Cursor up/down in Rows }

   wpAutoInsertRow, { wpAutoInsertRow,  TAB in last cell. Must be combined with wpSpreadsheetCursorMovement }

   wpNoEditOutsideTable, { to simulate spreadsheet     }

   wpBreakTableOnReturnInRow, {  instead of inserting a row break up the table }

   wpActivateUndo, { activate UNDO }

   wpActivateUndoHotkey, {     activate ALT + Backspace - requires wpAllowUndo set too }

   wpActivateRedo, { makes backup of complete text ! }

   wpActivateRedoHotkey, { makes backup of complete text ! }

   wpAlwaysInsert, { don't switch to   overwrite }

   // wpDeactivateCharsetSwitching,

   wpMoveCPOnPageUpDown, { Move Cursor on Page up or Down code -  }

   wpAutoDetectHyperlinks, // Create a hyperlink after 'www.' was typed

   wpNoHorzScrolling,

   wpNoVertScrolling,

   // wpNoAutomaticHangingBulletsAndNumbers, - see FormatOption!

   // wpMDIDragAndDrop,

   // wpDontDeleteExtraSpace,

   // wpUseHyphenation,  -> Moved to FormatOptions!

   wpDontSelectCompleteField, // Selections will always wrap the complete merge field

   wpSelectCompleteFieldAlsoWhenInside, // When selection inside of field also complete field is selected

   wpStreamUndoOperation, // saves also additional info like bands, objects ..

   //is default: wpToolBarDisableDifferentFontsInSelections, // Sets Size,Color, Font to blank is not = in a selection

   wpTabToEditFields, // not used.

  // wpAllowEditHeaderFooter

   wpSelectPageOnDblClick, //V5=ok

   // Used by TWPRichText only:

   wpAllowCreateTableInTable // - the create table button allows nested tables

    // Don't allow selection at all

   );

 

 

TWPEditOptionsEx = set of

   (

   wpDisableSelection, // The user cannot select text (see ViewOptions to hide selection)

   wpDisableCaret, // The caret (insertion point marker at cursor position) is not displayed

   wpDisableGetFocus, // The editor will never receive the focus

   wpDisableEditOfNonBodyDataBlocks, // in Pagelayout mode other DataBlocks (header, footer) cannot

   // be selected for edtiting with a click of the mouse

   wpAllowCursorInRow, // the cursor can be placed in row end marker to create a new row with return

   wpTextObjectMoving, // move text objects (ObjType=wpobjTextObj)

   wpTextObjectSelecting, // By defualt allow selectiong of text objects

   wpNoAutoWordStartEndFieldSelection, // Normally a complete field is selected

   // when the cursor is moved over the start or end of a mail merge field.

   // unless wpNoAutoWordSelection is used.  Also see EditOption: wpSelectCompleteFieldAlsoWhenInside

   // Note: wpNoAutoWordStartEndFieldSelection only applies to selection with mouse!

   wpDisableAutoCharsetSelection, // If true the charset is not retrieved by

   // checking the current keyboard layout when the user types

   wpIgnoreSingleCellSelection, // No cell selection by pointing in bottom left corner

   wpTABMovesToNextEditField, // used with forms

   wpDblClickCreateHeaderFooter, // Double click in Margin creates header/footer for all pages

   // Use 'OnClickCreateHeaderFooter' event to modify 'range'

   wpRepaintOnFieldMove, // When the cursor moves to a different field

   // the form is repainted. This is important if you use code to

   // highlight the current field. (using event: OnGetAttributeColor)

   wpKeepCellsWhenCombiningCells, // use the HTML way to combine cells horizontally

   wpAllowSplitOfCombinedCellsOnly, // use the HTML way to split cells, dont allow split if not combined

   wpDontClearStylesInNew, // If defined Action 'New' will not clear the defined styles

   wpDontResetPagesizeInNew, // If defined clearing the text will not set up the default page size

   wpSetDefaultAttrInNew, // If defined "New" will preset the writing attributes to the default

   wpAllowDrawDropBetweenTextBlocks, // Allow drag & drop between header and body

   wpDisableFastInitOnTyping, // Disable the improved typing performance in large paragraphs

   wpDontTriggerPopupInContextEvent, // Changes the time the event OnMouseDownWord is triggered (old behaviour)

   wpAlwaysColWidthPC, // Changine column width sets percentage colwidth in cells

   wpDisableXPosLineUpDown, // Disable the code which triues to keep cursor at same X position in Line up/down

   wpDontInitSelTextAttrWithDefaultFont, // SelltextAttr will not report the default attr for undefined

   wpDontSelectCellOnSpreadsheetMovement, // when tabbing throgh a table dont select the cell

   wpScrollLineWise, // When using line up&down do not move by 1/3 screen but only by the height of a line

   wpZoomWithMouseWheel, // Press Ctrl + use Mouse Wheel to zoom in and out

   wpTableRowResizingWithCTRL, // Resize rows when also CTRL is pressed

   wpDontUseNumberIndent,s // when using Inc/Dec Outline Level ignore the indents defined in number styles

   wpAutoCaptitalize, // Auto capitalize sentence starts

   wpTriggerOpenDialogForSectionProps // Click on section arrow triggers OpenDialog(wpdiaSectionPageSetup)

 

   );

 

TWPEditOptionsEx2 = set of

   (

   wpDontAllowDragTextInFields,

   wpDontAllowDragImagesInFields,

   wpEnableDragFieldsInFields,

   wpDisableDragDropInShowFieldsMode,

   wpDisableDoubleclickSelectsMarker,

   wpSuppressReplaceWordsMessage, // do not show the message "x words replaced"

   wpAlwaysTriggerFieldFocusEvent, // always trigger the FieldFocus event, not only in formular mode

   wpRowMultiSelect, // In Table row multi select with CTRL

   wpDeleteAtEOFRemovesSpaceAfter, // DELETE in last line of text sets spaceafter to 0

   wpCellMultiSelect, // In Table cell multi select with CTRL

   wpDisableSelectAll, // SeletAll cannot be executed anymore. Thats useful when working with forms

   wpClearCellsOnDelete,

   wpShowPageHoverframe, // When the user moves over a page a frame is shown.

   wpSaveToFileCreatesBackupfile, // WPRichText.SaveToFile keeps the backup file .~N~ it created before writing

   wpClearSelectionDontRemoveParAttr,  // SelectAll, ClearSelection in body, also clears paragraph attributes. This can be disabled using this flag

   wpAlwaysLockTextBoxHeight, // Lock all textboxes (WPTools premium) despite Mode

   wpNoMiddleMouseBtnScroll,  // Disable scrolling after pressing the middle mouse button and move mouse up/down

   wpOnlySelectInSameCell, // Only allow selection inside one cell or complete table

   wpRulerSharedBySplitscreenEditors, // Activate this if the ruler is shared by several editors

   // it will only be updated if it is the current, focussed editor

   wpSwapCursorKeysInRTLMode, // Swap left/right when wpWriteRightToLeft was activated in FormatOptions

 

   wpTABDoesNotChangeNumlevel,  // Disable tab / shift-Tab for outlines

   wpLockResizeOfProptectedTables, // If a table is protected it cannot be resized

   wpDetectClickOnObjectsOfOtherLayers, // If the user clicks on an image

   // linked in a header it is also possible to select and move the object

 

  wpDontEnterHeaderOnClick, // do not enter the header on mouse click. On Cursor movement the body is selected instead!

  wpDontEnterFooterOnClick,  // do not enter the footer on mouse click. On Cursor movement the body is selected instead!

  wpObjectInplaceEditorSelecting, // Allow selection of InplaveEditors connected to text objects

  wpAttrChangeOperateOnParAttr, // Do not modify character attributes on toolbar changes but always paragraph attributes

  wpDisallowTables  // Table support has been disabled. The toolbar will hide the tools automatically

 

   );