EditorGadget border thickness
Posted: Sat Mar 10, 2018 5:52 am
I've just spent the last WEEK trying to work out why my EditorGadget would sometimes have a thicker border than normal when setting text in it.
Here's what I mean:

Today, I finally worked out why: if the EditorGadget is DISABLED when you set MULTILINE text in it, the border becomes thick -- and stays thick even if you enable the gadget AFTER setting the text!
So the "solution" was to ENABLE the EditorGadget BEFORE setting MULTILINE text in it. Yes, the order of operations makes a difference. Who would've known?
Below is my test code that shows the problem. Is this common knowledge, or a bug?

Today, I finally worked out why: if the EditorGadget is DISABLED when you set MULTILINE text in it, the border becomes thick -- and stays thick even if you enable the gadget AFTER setting the text!
Below is my test code that shows the problem. Is this common knowledge, or a bug?
Code: Select all
OpenWindow(0,200,200,210,100,"test",#PB_Window_SystemMenu)
EditorGadget(1,10,10,90,80)
DisableGadget(1,1)
SetGadgetText(1,"thin border")
DisableGadget(1,0)
EditorGadget(2,110,10,90,80)
a$="thick border"+#CRLF$
For a=1 To 10
a$+Str(a)+#CRLF$
Next
DisableGadget(2,1) ; Comment this to see the difference!
SetGadgetText(2,a$)
DisableGadget(2,0)
Repeat : Until WaitWindowEvent()=#PB_Event_CloseWindow