CTextView:SetWordwrap


The SetWordwrap method activates word wrapping for the CTextView.

Syntax

CTextView:SetWordwrap()

CTextView:SetWordwrap( bWrap )

where

    bWrap is a true to activate word wrapping. If omitted, it is true.

  

With word wrapping enabled, the Text Editor breaks lines at the right margin of the viewable area of the window. Wrapping affects the way the text is displayed but does not change the actual text data.

When a CTextView is created, word wrapping is activated by default. Use this method to change the word wrapping state at any time.

Example

The following script shows opening a CTextView T and disables word wrapping before wring text to the window:

T = CTextView:new()

-- create a new instance T of the CTextView

T:SetWordwrap(false)

-- disable word wrapping

T:Printf("long sentence...")

-- write something to the window

  --

 

T:delete()

-- when done with the object, delete it

Related Topics

GetWordwrap

CTextView class