Make common controls' scrollbars replaceable lazarus / 31-LCL ---------------------------------------------------------------------- AlexTP · 2014-08-16 17:47 I have component TATScrollbar (see forum), and it's good if Laz can enable me to replace OS scrollbars (of TTreeview, TListview, TMemo, TListbox) with my bars. Now I need to hack into unit of LCL which creates OS bars. it's bad, hard to. and changes will be lost on Laz update. Is it ok idea? ---------------------------------------------------------------------- taazz · 2014-08-16 18:14 No its not. The Tscrollbar and their inherited items are not used and probably will never be used from any control. The reason is that the TScrollbar has its own window and it is a control it self while the Scroll bar that the controls are using is virtual and uses the control's window for everything. So you have to inherit all the controls you want to change and replace their scroll bars.   On top of that you should create a minimalistic diff that will allow your inherited controls to replace the scroll bars. You have 2 options 1) make the scrollbar variables accessible for inherited items or 2) introduce a method that will create a scroll bar that you can override. hope it helps ---------------------------------------------------------------------- AlexTP · 2014-08-16 18:30 Ur answer is weird. I don't see why LCL "option" to replace "virtual" or what ever scrollbars, is bad. it's needed. when? when app needs to be painted with custom colors. U only tell me what to do now. I do know it. i suggest other thing. "Option" to replace bars with my bars. ---------------------------------------------------------------------- taazz · 2014-08-16 18:34 Quote from: Alex22 on August 16, 2014, 08:30:08 pmUr answer is weird. I don't see why LCL "option" to replace "virtual" or what ever scrollbars, is bad. it's needed. when? when app needs to be painted with custom colors. U only tell me what to do now. I do know it. i suggest other thing. "Option" to replace bars with my bars. In that case just do what you know is required then go to the bug tracker and post the patch to allow for the controls to have their own scroll bars. There is no reason for the team to decline the patch. ---------------------------------------------------------------------- AlexTP · 2014-08-16 18:43 Gut, it's an option for me. If I make such a patch. Tks