Change the colour of the selection gutter of a richedit
Posted: Sat Oct 08, 2005 10:04 am
Code: Select all
Global MainWindowID
Global EditorHandle, EditorID
Procedure EdResizeClient()
MoveWindow_(EditorID, 0, 0, WindowWidth(), WindowHeight(), 0)
EditorRect.RECT\left = 20
EditorRect\top = 2
EditorRect\right = WindowWidth() - EditorRect\left
EditorRect\bottom = WindowHeight()
SendMessage_(EditorID, #EM_SETRECT, 0, EditorRect)
EndProcedure
Procedure MainFormShowModal()
Wnd_StdParam = #PB_Window_SystemMenu | #PB_Window_MaximizeGadget | #PB_Window_SizeGadget
Wnd_StdParam = Wnd_StdParam | #PB_Window_MinimizeGadget | #PB_Window_WindowCentered | #PB_Window_Invisible
MainWindowID = OpenWindow(#PB_Any, 0, 0, 640, 480, Wnd_StdParam, "See Sharp")
CreateGadgetList(WindowID(MainWindowID))
;Create the editor and do some stuff with it
EditorHandle = EditorGadget(#PB_Any, 0, 0, 20, 20)
EditorID = GadgetID(EditorHandle)
FontHandle = LoadFont(#PB_Any, "Courier New", 10)
;Show the window and activate the editor
HideWindow(MainWindowID, 0)
ActivateGadget(EditorHandle)
Repeat
EventID = WaitWindowEvent()
Select EventID
Case #PB_Event_CloseWindow
Quit = 1
Case #PB_Event_SizeWindow
EdResizeClient()
EndSelect
Until Quit = 1
EndProcedure
MainFormShowModal()