Previous Up Next

_CReditLine
Create a text control with only one editable line.

ObjText _CReditLine (
Chn _channel_
ObjWin _father_
I _x_
I _y_
I _width_
I _height_
I _flags_
S _string_
)
Parameters

_channel_
proprietary channel
_father_
father window
_x_
x coordinate
_y_
y coordinate
_width_
width
_height_
height
_flags_
flags :
ET_AHSCROLL allow horizontal scrolling
ET_HSCROLL display horizontal scroll box
ET_BORDER display a border
ET_PASSWORD password control (display only '*')
ET_HIDE do not display text
ET_TABFOCUS if parent window is a dialog box, manage TAB key
ET_DOWN display 3d border
ET_HIDDEN the control is hidden
ET_LOWERCASE lower case content
ET_NOEDIT the control is not editable
ET_SIZEBOX

the control can be resized

typeof Win = ObjWin;;
typeof Text = ObjText;;

fun cbWin (obj, user_parameter)=
	_closemachine;;
	
fun main ()=
	_showconsole;
	set Win = _CRwindow _channel nil 0 0 300 200 WN_NORMAL "Test text size window";
	_CBwinDestroy Win @cbWin 0;
	
	set Text = _CReditText _channel Win 5 5 200 50 ET_DOWN|ET_SIZEBOX "Resize this control";
	0;;

ET_TRANSPARENT the background control is transparent
ET_UPBORDER

style border

set win = _CRwindow _channel nil 0 0 300 200 WN_NORMAL "Test Text Flags";
set text = _CRtext _channel win 0 25 300 50 ET_LOWERCASE|ET_SIZEBOX "Bob and Alice are married !";

ET_DRAGDROP allow drag and drop inside the control
ET_NUMBER only numbers can be typed in this control
_string_
initial content
Return value

new text control