I want the text in the EditorGadget look the same as in the TextGadget (bottom example)
Code: Select all
EnableExplicit
#ST_UNICOE = 8
Define ste.SETTEXTEX
ste\flags = #ST_UNICOE
ste\codepage = 1200
Define text$ = "Before they're forever banned?" + #LF$
text$ + "(Kotae, bou ya, osora fuku) 答え、坊や、お空吹く" + #LF$
text$ + "(Kaze ga shitteru dake sa) 風が知ってるだけさ" + #LF$
text$ + "How many years must a mountain exist" + #LF$
Define font.l = LoadFont(0, "Arial", 14)
OpenWindow(0, 300, 300, 570, 500, "Editorgadget")
EditorGadget(1, 10, 10, 550, 120, #PB_Editor_ReadOnly)
SetGadgetFont(1, font)
EditorGadget(2, 10, 140, 550, 120, #PB_Editor_ReadOnly)
SetGadgetFont(2, font)
EditorGadget(3, 10, 270, 550, 120, #PB_Editor_ReadOnly)
SetGadgetFont(3, font)
TextGadget(4, 10, 400, 550, 120, "")
SetGadgetFont(4, font)
SetGadgetText(1, text$) ;not working
SendMessage_(GadgetID(2), #WM_SETTEXT, 0, @text$) ;not working
SendMessage_(GadgetID(3), #EM_SETTEXTEX, @ste, @text$) ;not working
SetGadgetText(4, text$) ;working
Repeat
Until WaitWindowEvent(1) = #PB_Event_CloseWindow
Henry
Purebasic 5.72, Windows 10-64