Qt Components Hildon  0.20
QML components for Maemo5 with Hildon styling.
 All Classes Functions Properties Groups Pages
Public Member Functions | Properties | List of all members
TextArea Class Reference

A component for displaying/editing multiple lines of text. More...

Public Member Functions

void clear ()
 Clears all text.
void copy ()
 Copies the selected text to the clipboard.
void cut ()
 Cuts the selected text to the clipboard.
void forceActiveFocus ()
 Forces the text area to become the current focus item.
void paste ()
 Pastes text from the clipboard into the text area.
point positionAt (int x, int y)
 Returns the cursor position at co-ordinates x, y.
rect positionToRectangle (point pos)
 Returns the position at point pos as a rectangle.
void select (int start, int end)
 Selects the text between start and end.
void selectAll ()
 Selects all text.
void selectWord ()
 Selects the current word.

Properties

int cursorPosition
 The current cursor position.
font font
 The text font.
enumeration horizontalAlignment
 The horizontal alignment of the text.
enumeration inputMethodHints
 The input method hints.
int lineCount
 The number of lines displayed in the text area.
int lineHeight
 The maximum height of a line of text in the text area.
string placeholderText
 The text to be displayed when no text is set.
bool readOnly
 Whether the text area is read only.
string selectedText
 The currently selected text.
int selectionEnd
 The cursor position at the end of the currently selected text.
int selectionStart
 The cursor position at the start of the currently selected text.
TextAreaStyle style
 Provides styling properties for the text area.
string text
 The current text.
enumeration textFormat
 The format of the text.
enumeration verticalAlignment
 The vertical alignment of the text.
enumeration wrapMode
 The wrapping behaviour of the text.

Detailed Description

A component for displaying/editing multiple lines of text.

import QtQuick 1.0
import org.hildon.components 1.0
Window {
id: window
title: qsTr("TextArea Example")
visible: true
Column {
id: column
anchors.centerIn: parent
width: 300
width: parent.width
text: qsTr("Hildon TextArea")
}
width: parent.width
text: qsTr("Osso TextArea")
}
}
}
See Also
Label, OssoTextAreaStyle, TextAreaStyle, TextField
Examples:
directory.qml, file.qml, process.qml, and textarea.qml.

Member Function Documentation

point TextArea::positionAt ( int  x,
int  y 
)

Returns the cursor position at co-ordinates x, y.

Parameters
x
y
Returns
rect TextArea::positionToRectangle ( point  pos)

Returns the position at point pos as a rectangle.

Parameters
pos
Returns
void TextArea::select ( int  start,
int  end 
)

Selects the text between start and end.

Parameters
start
end

Property Documentation

bool TextArea::readOnly

Whether the text area is read only.

The default value is false.