In this lesson we are going to create four TextEdit fields.
Now we starting to make the Mask: “m_textedit.per”
DATABASE FORMONLY
SCREEN
{
[mx1 ]
———————————————————————
[textedit1 ]
[textedit1 ]
[textedit1 ]
[textedit1 ]
[mx2 ]
———————————————————————-
[textedit2 ]
[textedit2 ]
[textedit2 ]
[textedit2 ]
[mx3 ]
———————————————————————-
[textedit3 ]
[textedit3 ]
[textedit3 ]
[textedit3 ]
[mx4 ]
———————————————————————-
[textedit4 ]
[textedit4 ]
[textedit4 ]
[textedit4 ]
}
ATTRIBUTES
LABEL mx1 = FORMONLY.label1;
LABEL mx2 = FORMONLY.label2;
LABEL mx3 = FORMONLY.label3;
LABEL mx4 = FORMONLY.label4;
You can you compile this file with “fcompile -xml m_text.per”
Now we are going to create our main programm “m_text.4gl”
MAIN
DEFINE label1 CHAR(50)
DEFINE label2 CHAR(50)
DEFINE label3 CHAR(50)
DEFINE label4 CHAR(50)
CLOSE WINDOW screen
CALL ui.Interface.loadActionDefaults(”default”)
CALL ui.Interface.loadStyles(”default”)
OPEN WINDOW w_1 WITH FORM “m_text”
CALL ui.Interface.settext(”Textedit Example”)
LET label1 = “TextEdit field No. 1″
LET label2 = “TextEdit field No. 2″
LET label3 = “TextEdit field No. 3″
LET label4 = “TextEdit field No. 4″
DISPLAY BY NAME label1,
label2,
label3,
label4
MENU “Navigation”
COMMAND “Edit”
CALL init_textedit()
COMMAND “Exit”
EXIT MENU
END MENU
END MAIN
FUNCTION init_textedit()
DEFINE Textedit1 TEXT
DEFINE Textedit2 TEXT
DEFINE Textedit3 TEXT
DEFINE Textedit4 TEXT
INPUT BY NAME textedit1,
textedit2,
textedit3,
textedit4
END FUNCTION
All available Attributes can be found here
And now our finish result:






