FreeDelphiPascal 19 Posted October 3, 2023 Hi. I used to use in my program this great component called TFoldPanel. It was for Delphi 1 to Delphi 3 but still works today. (Isn't great when a great programmer makes a control so great that it still works today under Delphi 11?) When you click the chevron (first image, left side), the whole panel, with everything inside collapses (image 2). However, it has a big problem: it does not support skins (VCL styles). (image 3 - the panel should be black) Does anyone know a similar component? Share this post Link to post
Remy Lebeau 1394 Posted October 3, 2023 1 hour ago, FreeDelphiPascal said: However, it has a big problem: it does not support skins (VCL styles). (image 3 - the panel should be black) Does anyone know a similar component? Do you have the source code for TFoldPanel? If so, why not simply update it to support Styles? 1 Share this post Link to post
FreeDelphiPascal 19 Posted October 3, 2023 4 minutes ago, Remy Lebeau said: Do you have the source code for TFoldPanel? If so, why not simply update it to support Styles? I am just lazy. Replacing the control with an existing control will take way less time. As I said, the code has lines of code specific for Delphi 1/2/3 (conditionals). Anyway, I am in the source code now, chin-deep 🙂 Share this post Link to post
FreeDelphiPascal 19 Posted October 3, 2023 (edited) Fixed 🙂 (Still, if anyone knows a modern component like this.....) Edited October 3, 2023 by FreeDelphiPascal Share this post Link to post
aehimself 396 Posted October 3, 2023 A little too late, but TSplitView shipped with D11 can also do this, with an addition of animated opening / closing. The backdraw is it only can be opened to the side, so you cannot expand down as far as I checked. I'm using it as a collapsible menu, opening by hovering your mouse on the chevron: Share this post Link to post
Pat Foley 51 Posted October 3, 2023 CategoryPanel or Tabsheets in pagecontrol with tabs left side. Or try the samples in /Samples for ideas. Ray K site https://delphibydesign.com/ has a few samples under downloads. I look at his generics samples from time to refresh how generics and even how to set earlier object list code. Share this post Link to post
limelect 48 Posted October 5, 2023 (edited) @FreeDelphiPascal I know the component very well and use it can you put here the fixed source? Edited October 5, 2023 by limelect Share this post Link to post
mvanrijnen 123 Posted October 5, 2023 Problem with this kind of panels is that the space where icon is placed (in "collapsed/closed" mode) is taken for other components. Share this post Link to post
FreeDelphiPascal 19 Posted October 6, 2023 On 10/5/2023 at 5:08 PM, limelect said: @FreeDelphiPascal can you put here the fixed source? The fix is not perfect. still needs improvements. but it works for the moment. Plus, a similar change needs to be done to change the separator line (divider). procedure TPaneles.Paint; var Rect: TRect; FontHeight: Integer; const Alignments: array[TAlignment] of Word = (DT_LEFT, DT_RIGHT, DT_CENTER); begin if StyleServices(Self).Enabled //mine then Color:= TStyleManager.ActiveStyle.GetSystemColor(clBtnFace); //mine Share this post Link to post
limelect 48 Posted October 7, 2023 (edited) Thanks, I will wait for the final fix Thanks for the source Edited October 7, 2023 by limelect Share this post Link to post
limelect 48 Posted October 7, 2023 (edited) D10.2.3 It Is Ok thanks Edited October 7, 2023 by limelect Share this post Link to post