You can put it inside a ContainerGadget. It's not perfect - the colour is still lighter than the scrollbars, but it's not white, at least. SetGadgetColor() only seems to affect the left and top edges of that space for some reason.
Code: Select all
OpenWindow(0, 30, 30, 500, 400, "Demo1", #PB_Window_SystemMenu | #PB_Window_MinimizeGadget)
SetWindowColor(0, 0)
ContainerGadget(0, 120, 60, 300, 100)
EditorGadget(1, 0, 0, 300, 100)
CloseGadgetList()
SetGadgetText(1, "Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow" + #CRLF$ + #CRLF$ +#CRLF$ +#CRLF$ +#CRLF$ )
SetGadgetColor(0, #PB_Gadget_BackColor, RGB(0, 0, 0))
SetGadgetColor(1, #PB_Gadget_BackColor, $323232)
SetGadgetColor(1, #PB_Gadget_FrontColor, $F2F2F2)
SetWindowTheme_(GadgetID(1), "DarkMode_Explorer", 0)
Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
Here's a way using a callback. I'm not sure if I've done it all right - somebody more knowledgable with the Windows API might know, but it seems to work.
Code: Select all
EnableExplicit
Global proc
Procedure EditorCallback(hWnd, uMsg, wParam, lParam)
Select uMsg
Case #WM_PAINT
Define rc.Rect, hDC, hBrush, scrollX, scrollY
CallWindowProc_(proc, hWnd, uMsg, wParam, lParam)
hDC = GetDC_(hWnd)
GetClientRect_(hWnd, @rc)
scrollX = GetSystemMetrics_(#SM_CXHSCROLL)
scrollY = GetSystemMetrics_(#SM_CXVSCROLL)
rc\left = rc\right
rc\top = rc\bottom
rc\right + scrollX
rc\bottom + scrollY
hBrush = CreateSolidBrush_(RGB(0, 0, 0))
FillRect_(hDC, rc, hBrush)
SetBkMode_(hDC, #TRANSPARENT)
DeleteObject_(hBrush)
ReleaseDC_(hWnd, hDC)
ProcedureReturn 0
EndSelect
ProcedureReturn CallWindowProc_(proc, hWnd, uMsg, wParam, lParam)
EndProcedure
OpenWindow(0, 30, 30, 500, 400, "Demo1", #PB_Window_SystemMenu | #PB_Window_MinimizeGadget)
SetWindowColor(0, 0)
EditorGadget(1, 120, 60, 300, 100)
SetGadgetText(1, "Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow" + #CRLF$ + #CRLF$ +#CRLF$ +#CRLF$ +#CRLF$ )
SetGadgetColor(1, #PB_Gadget_BackColor, $323232)
SetGadgetColor(1, #PB_Gadget_FrontColor, $F2F2F2)
SetWindowTheme_(GadgetID(1), "DarkMode_Explorer", 0)
proc = SetWindowLong_(GadgetID(1), #GWL_WNDPROC, @EditorCallback())
Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow