Change the colour of the selection gutter of a richedit

Windows specific forum
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Change the colour of the selection gutter of a richedit

Post by Trond »

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()
You see the selection gutter? How can I change the colour of it?
User avatar
GeoTrail
Addict
Addict
Posts: 2794
Joined: Fri Feb 13, 2004 12:45 am
Location: Bergen, Norway
Contact:

Post by GeoTrail »

I can't see anything apart from the white editor space.
I Stepped On A Cornflake!!! Now I'm A Cereal Killer!
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Post by Trond »

GeoTrail wrote:I can't see anything apart from the white editor space.
That's because the selection gutter is white too! Type a few lines and you'll see what I mean.

Edit: The selection gutter is area at the left of the text where the cursor changes into a reversed cursor and you can select text.
User avatar
GeoTrail
Addict
Addict
Posts: 2794
Joined: Fri Feb 13, 2004 12:45 am
Location: Bergen, Norway
Contact:

Post by GeoTrail »

Aaa I see it now :)
I Stepped On A Cornflake!!! Now I'm A Cereal Killer!
Post Reply