aboutsummaryrefslogtreecommitdiffstats
path: root/qml/TextField.qml
blob: d60d14b550c15e5cf85919e74b39307ac08b8232 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import QtQuick 1.1

Rectangle {

    id: textField

    property alias text: textInput.text

    width: 114
    height: 28
    color: "#ffffff"
    radius: 3
    border.width: 1
    border.color: "#999999"

    TextInput {
        id: textInput
        width: 102
        height: 20
        color: "#151515"
        text: parent.text
        selectionColor: "#008000"
        font.pixelSize: 12
        anchors.centerIn:parent
        onActiveFocusChanged: {
                if (textInput.activeFocus)
                    parent.border.color = "#0000ff";
                else
                    parent.border.color = "#999999";
            }
    }
}