CTextView:SetWordwrap


The SetWordwrap method activates word wrapping for the CTextView.

Syntax

CTextView:SetWordwrap( bWrap=true )

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

Remarks

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 = new_textview()

-- 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

CTextView, Clear

 

 

Mira Pro x64 Script User's Guide, Copyright Ⓒ 2024 Mirametrics, Inc. All Rights Reserved.