GtkTextView Class

The GtkTextView class is the class for instantiating text view widgets.

The class heirarchy


   Object
      +---GtkWidget
         +---GtkContainer
            +---GtkTextView

The methods for the GtkTextView class are documented below.

GtkTextView Method Table of Contents

new - Create and initialize the widget
editable= - Make the widget editable
fromarray - Set the contents from an OREXX array
text - Put the contents into an OREXX variable
text = - Set the contents froma variable
toarray - Put the contents into an OREXX assay
wrapmode = - Set the line wrap mode


Method: new

This method creates and initializes the widget.

Example

This is a example of how to create a new text view widget.


mytextview = .GtkTextView~new()

Method Parameters

None.

Method Results

The new text view widget.




Method: editable=

This method makes the widget editable by the user.

Example

This is a example of how to make the widget editable.


state = .true
mytextview~editable = state

Method Parameters

state
One (.true) makes the widget editable and 0 (.false) makes it read-only

Method Results

None.




Method: fromarray

This method put the contents of an OREXX array into the widget.

Example

This is a example of how to set the contents of a text view widget.


myarray = .aaray~new()
myarray[1] = 'First line'
myarray[2] = 'Second line'
myarray[3] = 'Third line'
mytextview = .GtkTextView~new()
mytextview~fromarray(myarray)

Method Parameters

myarray
An Object REXX array of strings.

Method Results

None.


Method: text

This method puts the text of the widget into an OREXX variable.

Example

This is a example of how to put the text of the widget into a variable.


text = mytextview~text()

Method Parameters

None.

Method Results

text
The text of the widget in UNIX form (LF seperated lines).



Method: text =

This method puts the contents of a variable into the widget.

Example

This is a example of how to put the contents of a variable into the widget.


text = 'First line' || '0A'x
text = text || 'Second line' || '0A'x
text = text || 'Third line' || '0A'x
mytextview~text = text

Method Parameters

text
The text to be put into the widget.

Method Results

None.




Method: toarray

This method puts the text of the widget into an OREXX array.

Example

This is a example of how to put the text of the widget into an array.


myarray = mytextview~toarray()

Method Parameters

None.

Method Results

myarray
The text of the widget in array form (one line per member).



Method: wrapmode =

This method sets the line warp mode of the widget.

Example

This is a example of how to set the line wrap mode.


state = .true
mytextview~wrapmode = state

Method Parameters

state
One (.true) set line wrap mode and 0 (.false) resets it.

Method Results

None.




Valid XHTML 1.0!