prev | index | next

MX-TextField properties
6
30
537 bytes
1072 bytes
2002-05-03 00:00:00
2003-06-11 00:10:36
Oldes (oliva.david@seznam.cz)


To show some of the new TextField properties

You can enter just numbers in the 1. text field and uppercase letters in the second one

(mx-textfield.rswf)
background 153.165.139
require %includes/gui-mainfonts.rswf
txt_t1: EditText t 0x18 [Font [fnt_gui_arial 12] border useOutlines]
txt_t2: EditText t 0x18 [Font [fnt_gui_arial 12] border useOutlines]
txt_t3: EditText t 0x18 [Font [fnt_gui_arial 12] border useOutlines]
txt1: place txt_t1 at 160x20
txt2: place txt_t2 at 160x40
txt3: place txt_t3 at 160x60
doAction [
    constantPool [redText autoSize restrict]
    redText: make TextFormat ["Arial CE" 12 #ff0000]
    with txt1 [
        autoSize: "left"
        restrict: "0-9"
    ]
    with txt2 [
        autoSize: "center"
        restrict: "A-Z"
        backgroundColor: #ffa500
        borderColor: #ff0000
    ]
    with txt3 [
        autoSize: "right"
        setNewTextFormat(redText)
    ]
    t: "TextField example"
]
showFrame
end