einem Stringgadget wunderbar klappt .
Code: Alles auswählen
;///////////////////////////
;/ Enables the explicit mode
;EnableExplicit
;///////////////////////////
;/ Declare variables
Define WindowTitle.s = "Test"
Define CX.l = 500
Define CY.l = 500
Define *hWindow.long
Define *hFont.long
Define *hEditor.long
Define WindowEvent.l
;///////////////////////////
;/ Open window
*hWindow = OpenWindow(#PB_Any,#PB_Ignore,#PB_Ignore,CX,CY,WindowTitle)
;///////////////////////////
;/ Gadgets
CreateGadgetList(*hWindow\l)
;*hEditor = StringGadget(#PB_Any,0,0,CX,CY,"",#ES_MULTILINE)
*hEditor = EditorGadget(#PB_Any,0,0,CX,CY)
*hFont = LoadFont(#pb_any,"Courier new",10)
SetGadgetFont(*hEditor,*hFont\l)
Debug GetGadgetFont(*hEditor)
;///////////////////////////
;/ Window eventloop
Repeat
WindowEvent = WaitWindowEvent()
Until WindowEvent = #WM_CLOSE
;///////////////////////////
;/ Exit application
End