Possible to replace scrollbar in default controls? lazarus / 31-LCL ---------------------------------------------------------------------- AlexTP · 2014-05-27 00:09 Is it possible to replace OS drawn scrollbars in a) memo, b) string grid, b) richedit... Only OS dependant scrollbars can be shown in standard controls? Or I can paint em? ---------------------------------------------------------------------- Mike.Cornflake · 2014-05-27 17:48 Good question.  I had a go a few years ago and failed (TDBGrid).  In the end I hid the existing scrollbars, added my own outside the control in question, then hooked everything together in my form code. I'd be very interested in any answer from others, but I suspect the answer is going to be no.  In the case of TDBGrid, there is a lot of code inside there relating to it's own scrollbars. ---------------------------------------------------------------------- Mike.Cornflake · 2014-05-29 08:17 QuoteMike, how your scrollbar looks like? it's free? You'll have worked this out by now, but for completeness here, I use TScrollbar :-)  It's free enough :-) ---------------------------------------------------------------------- AlexTP · 2014-06-14 04:25 I see it's possible! I need to change Treeview bars. So I need to override functions SetScrollInfo ShowScrollBar in unit mybars, and add "mybars" to "uses" of CommonControls unit. In mybars I need to use "Handle" and make new bars - for window of Handle (tree view) ---------------------------------------------------------------------- AlexTP · 2014-06-14 04:32 How to change treeview "Client size" (ClientRect) when I make my own vert+Horz bars? if i just show my bars as childs of treeview- ClientRect will be wrong ---------------------------------------------------------------------- howardpc · 2014-06-14 07:01 I think something along these lines would do: Code: [Select]  TMyTreeView = class(TCustomTreeView)   private     FTrueClientRect: TRect;   protected     function GetClientRect: TRect; override;   public     //...   end; implementation function TMyTreeView.GetClientRect: TRect; begin   FTrueClientRect:=inherited GetClientRect;   Result:=FTrueClientRect;   Result.BottomRight:=YourNewValueGoesHere; end;