Areatext =Panel

BlitzPlus Forums/BlitzPlus Programming/Areatext =Panel

LD(Posted 2003) [#1]
Hi

It s possible to lock a textarea as a panel.

(the user can't write or click inside ???)

Thk


CS_TBL(Posted 2003) [#2]
'lock' ? you mean disablegadget yourmightytextarea ??


EOF(Posted 2003) [#3]
; TextArea - ReadOnly
; Syntax Error

; userlib
; ************************
; .lib "user32.dll"
; SendMessage%(hwnd,msg,wParam,mParam):"SendMessageA"
; ************************


Const EM_SETREADONLY=$CF

win=CreateWindow("Read-Only Text Area",50,150,407,184,Desktop(),1)
textarea = CreateTextArea(18,26,361,96,win,1)
SetTextAreaFont textarea,LoadFont ("Tahoma",24,1)
AddTextAreaText textarea,"Edit me if you think your 'ard enough!"
lock=CreateButton("Locked (Read-Only)",100,130,120,20,win,2)
SetButtonState lock,True

SendMessage QueryObject(textarea,1),EM_SETREADONLY,1,0 ; lockdown

Repeat
	ev=WaitEvent()
	If ev=$401
		If EventSource()=lock
			SendMessage QueryObject(textarea,1),EM_SETREADONLY,ButtonState(lock),0
		EndIf
	EndIf
Until ev=$803
End



LD(Posted 2003) [#4]
Oki my friend

disablegadget is the solution



Thk again