Browse Source

BCExpandPanels added test; changed DebugInfo; added changelog

Massimo Magnano 1 year ago
parent
commit
78048a9353

+ 9 - 11
BCExpandPanels.pas

@@ -8,7 +8,7 @@
 *                                                                              *
 ********************************************************************************
 
-2014-01-31 MaxM: First port from original code
+See BcExpandPanels.txt for changelog and to-do
 }
 
 unit BCExpandPanels;
@@ -17,7 +17,6 @@ unit BCExpandPanels;
 {$mode objfpc}{$H+}
 
 // for debugging purposes
-//{$DEFINE DebugInfo}
 //{$DEFINE DEBUG_PAINT}
 
 interface
@@ -2016,9 +2015,9 @@ end;
 
 procedure TBCExpandPanel.setCollapsed(Value: boolean);
 begin
-{$IFDEF DebugInfo}
+{$ifopt D+}
   debugln('TBCExpandPanel.setCollapsed '+BoolToStr(Collapsed, True));
-{$ENDIF}
+{$endif}
 
   if FCollapsed = Value then
     exit;
@@ -2171,10 +2170,10 @@ end;
 
 procedure TBCExpandPanel.setExpandedSize(Value: integer);
 begin
-  {$IFDEF DebugInfo}
+  {$ifopt D+}
   debugln('TBCExpandPanel.setExpandedSize');
   debugln(IntToStr(Value));
-  {$ENDIF}
+  {$endif}
 
   if (FExpandedSize = Value) then
     exit;
@@ -2433,10 +2432,10 @@ begin
 
   Animate(FButtonSize);
 
-{$IFDEF DebugInfo}
+  {$ifopt D+}
   debugln('TBCExpandPanel.DoCollapse');
   debugln('FButtonSize ' + IntToStr(FButtonSize));
-{$ENDIF}
+  {$endif}
 
 end;
 
@@ -2454,11 +2453,10 @@ begin
 
   Animate(FExpandedSize);
 
-{$IFDEF DebugInfo}
+  {$ifopt D+}
   debugln('TBCExpandPanel.DoExpand');
   debugln('FExpandedSize ' + IntToStr(FExpandedSize));
-{$ENDIF}
-
+  {$endif}
 end;
 
 procedure TBCExpandPanel.AdjustClientRect(var ARect: TRect);

+ 65 - 0
BCExpandPanels.txt

@@ -0,0 +1,65 @@
+//  ExpandPanels   Version 3.0
+
+2024-01-31 MaxM: First port from original code in BGRAControls (formally Ver. 3.0)
+
+//  ExpandPanels   Version 2.2
+
+30-06-2016 MaxM :
+     Added Button.Style as bbsLineTop,bbsLineBottom,bbsLineDoubleTop,bbsLineDoubleBottom
+     Fixed Some Paint Coordinate position of Button elements and Lines
+
+21-06-2016 MaxM :
+     Added Button.GlyphKind (default to gkArrows)
+     Added gkClose (EXP_PANEL_CLOSE.png),
+           gkMinMax (EXP_PANEL_MIN_*.png, EXP_PANEL_MAX_*.png) Glyphs
+     Added TExpandPanels properties ButtonGlyphLayout,ButtonGlyphKind,ButtonStyle,ButtonTextLayout,ButtonTabWidth
+
+15-06-2016 MaxM :
+     Added Button.Style as bbsLine and bbsLineDouble
+
+09-06-2016 MaxM :
+     Completed Painting of Button.Style as bbsTab
+
+05-2016 MaxM :
+     Added Owner Draw of Panel so we can Draw Rounded Borders and don't draw Borders when Collapsed  
+     Added Style property on Button (bbsButton, bbsTab) (bbsTab paint is incomplete do not use)
+     Deleted BevenInner/Outer redefinition no more needed because now we draw the borders
+     Changed using of writeln with debugln because strange exceptions under Windows
+     Moved TMyRollOut.Loaded Code to CreateWnd because on RunTime creation is never Called
+     Fixed More OnCollapsed events
+     Fixed PositionButton is called only after Loaded is complete
+     Updated Copyright and Created separeted txt files
+     Added development test with only one panel (to simplify my life)
+
+//  ExpandPanels   Version 2.1
+
+23-07-2015 MaxM :
+     Added Owner Draw of Button so we can Draw Vertically when ButtonPosition is akLeft or akRight
+     Added Glyphs Support (Automatically Loaded from Resources or User Passed)
+     Solved Bugs About BevelOuter and Starting in Collapsed State
+     Moved Colors inside Button
+
+// TO-DO:
+
+- MaxM:
+
+Fix User components have 2 Pixels visible over the Button when Button Position
+      is akRight and is Collapsed SEE PROJECT1 DEVELOPMENT - ONLY ADDED IN TExpandPanels?
+Fix Shadows incoerence when Button.Style is bbsTab, the Panel attached side may not have borders.
+
+
+- Alex
+
+simplyfy everything with verctor addition and scalar multiplication (orthogonal basis vectors... and so on)
+      if horizonatal and vertical would be described by a unity vector, I could calculate if a certain operation should be performed
+      and I could just multiply the basis vector  with an operation to get a delta movement (or none)
+
+
+
+Known Bugs:
+
+- the TExpandPanels lacks a arrange on bottom and right
+
+- (Solved?) Button.Color Setted to clBtnFace at DesignTime -> Color = clSkyBlue in RunTime
+    (is not Loaded because is The inherited Default Color of TCustomSpeedButton)
+

+ 563 - 0
test/test_bcExpandPanels/test_bcExpandPanel.lpi

@@ -0,0 +1,563 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<CONFIG>
+  <ProjectOptions>
+    <Version Value="12"/>
+    <General>
+      <Flags>
+        <CompatibilityMode Value="True"/>
+      </Flags>
+      <Title Value="test_bcExpandPanel"/>
+      <UseXPManifest Value="True"/>
+    </General>
+    <VersionInfo>
+      <Language Value=""/>
+      <CharSet Value=""/>
+    </VersionInfo>
+    <BuildModes Count="2" Active="Debug">
+      <Item1 Name="Debug" Default="True"/>
+      <Item2 Name="Release">
+        <CompilerOptions>
+          <Version Value="11"/>
+          <SearchPaths>
+            <IncludeFiles Value="$(ProjOutDir)"/>
+          </SearchPaths>
+          <Parsing>
+            <SyntaxOptions>
+              <UseAnsiStrings Value="False"/>
+            </SyntaxOptions>
+          </Parsing>
+          <CodeGeneration>
+            <SmartLinkUnit Value="True"/>
+            <Optimizations>
+              <OptimizationLevel Value="3"/>
+            </Optimizations>
+          </CodeGeneration>
+          <Linking>
+            <Debugging>
+              <GenerateDebugInfo Value="False"/>
+              <RunWithoutDebug Value="True"/>
+            </Debugging>
+            <LinkSmart Value="True"/>
+            <Options>
+              <Win32>
+                <GraphicApplication Value="True"/>
+              </Win32>
+            </Options>
+          </Linking>
+        </CompilerOptions>
+      </Item2>
+    </BuildModes>
+    <PublishOptions>
+      <Version Value="2"/>
+    </PublishOptions>
+    <RunParams>
+      <local>
+        <LaunchingApplication PathPlusParams="/usr/X11R6/bin/xterm -T &apos;Lazarus Run Output&apos; -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/>
+      </local>
+      <FormatVersion Value="2"/>
+      <Modes Count="1">
+        <Mode0 Name="default">
+          <local>
+            <LaunchingApplication PathPlusParams="/usr/X11R6/bin/xterm -T &apos;Lazarus Run Output&apos; -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/>
+          </local>
+        </Mode0>
+      </Modes>
+    </RunParams>
+    <RequiredPackages Count="2">
+      <Item1>
+        <PackageName Value="bgracontrols"/>
+      </Item1>
+      <Item2>
+        <PackageName Value="LCL"/>
+      </Item2>
+    </RequiredPackages>
+    <Units Count="44">
+      <Unit0>
+        <Filename Value="test_bcExpandPanel.lpr"/>
+        <IsPartOfProject Value="True"/>
+        <EditorIndex Value="-1"/>
+        <CursorPos X="24" Y="6"/>
+        <UsageCount Value="86"/>
+      </Unit0>
+      <Unit1>
+        <Filename Value="test_bcexpandpanel_unit1.pas"/>
+        <IsPartOfProject Value="True"/>
+        <ComponentName Value="bcExpandPanelForm1"/>
+        <HasResources Value="True"/>
+        <ResourceBaseClass Value="Form"/>
+        <UnitName Value="test_bcExpandPanel_unit1"/>
+        <IsVisibleTab Value="True"/>
+        <TopLine Value="90"/>
+        <CursorPos X="17" Y="92"/>
+        <UsageCount Value="86"/>
+        <Loaded Value="True"/>
+        <LoadedDesigner Value="True"/>
+      </Unit1>
+      <Unit2>
+        <Filename Value="../../../expandpanels/expandpanels.pas"/>
+        <UnitName Value="ExpandPanels"/>
+        <EditorIndex Value="-1"/>
+        <TopLine Value="1158"/>
+        <CursorPos X="45" Y="1171"/>
+        <UsageCount Value="86"/>
+      </Unit2>
+      <Unit3>
+        <Filename Value="/LinuxPrograms/lazarus/lcl/controls.pp"/>
+        <UnitName Value="Controls"/>
+        <TopLine Value="96"/>
+        <CursorPos X="31" Y="119"/>
+        <UsageCount Value="6"/>
+      </Unit3>
+      <Unit4>
+        <Filename Value="/usr/share/fpcsrc/2.4.0/rtl/objpas/classes/classesh.inc"/>
+        <TopLine Value="1765"/>
+        <CursorPos X="10" Y="1788"/>
+        <UsageCount Value="6"/>
+      </Unit4>
+      <Unit5>
+        <Filename Value="/LinuxPrograms/lazarus/lcl/extctrls.pp"/>
+        <UnitName Value="ExtCtrls"/>
+        <TopLine Value="38"/>
+        <CursorPos X="35" Y="38"/>
+        <UsageCount Value="6"/>
+      </Unit5>
+      <Unit6>
+        <Filename Value="/LinuxPrograms/lazarus/lcl/lclclasses.pp"/>
+        <UnitName Value="LCLClasses"/>
+        <TopLine Value="15"/>
+        <CursorPos X="3" Y="38"/>
+        <UsageCount Value="6"/>
+      </Unit6>
+      <Unit7>
+        <Filename Value="/LinuxPrograms/lazarus/lcl/calendar.pp"/>
+        <UnitName Value="Calendar"/>
+        <TopLine Value="90"/>
+        <CursorPos X="17" Y="113"/>
+        <UsageCount Value="6"/>
+      </Unit7>
+      <Unit8>
+        <Filename Value="/LinuxPrograms/lazarus/lcl/include/control.inc"/>
+        <TopLine Value="30"/>
+        <CursorPos X="24" Y="61"/>
+        <UsageCount Value="6"/>
+      </Unit8>
+      <Unit9>
+        <Filename Value="/LinuxPrograms/lazarus/lcl/lclproc.pas"/>
+        <UnitName Value="LCLProc"/>
+        <TopLine Value="1520"/>
+        <CursorPos X="56" Y="1549"/>
+        <UsageCount Value="6"/>
+      </Unit9>
+      <Unit10>
+        <Filename Value="../../../expandpanels/pexpandpanels.pas"/>
+        <UnitName Value="Pexpandpanels"/>
+        <EditorIndex Value="-1"/>
+        <CursorPos X="15" Y="19"/>
+        <UsageCount Value="6"/>
+      </Unit10>
+      <Unit11>
+        <Filename Value="../../../expandpanels/icons.lrs"/>
+        <EditorIndex Value="-1"/>
+        <CursorPos X="17"/>
+        <UsageCount Value="6"/>
+      </Unit11>
+      <Unit12>
+        <Filename Value="../../../../Projects/test/effects_panel/effects_panel_main.pas"/>
+        <ComponentName Value="Form1"/>
+        <HasResources Value="True"/>
+        <ResourceBaseClass Value="Form"/>
+        <EditorIndex Value="-1"/>
+        <CursorPos X="11" Y="7"/>
+        <UsageCount Value="6"/>
+      </Unit12>
+      <Unit13>
+        <Filename Value="../../../expandpanels/developement test project/effects_panel/effects_panel_main.pas"/>
+        <ComponentName Value="Form1"/>
+        <HasResources Value="True"/>
+        <ResourceBaseClass Value="Form"/>
+        <EditorIndex Value="-1"/>
+        <TopLine Value="93"/>
+        <CursorPos Y="96"/>
+        <UsageCount Value="6"/>
+      </Unit13>
+      <Unit14>
+        <Filename Value="../../../expandpanels/expandpanels_o.pas"/>
+        <UnitName Value="ExpandPanels"/>
+        <EditorIndex Value="-1"/>
+        <TopLine Value="2008"/>
+        <CursorPos Y="2025"/>
+        <UsageCount Value="7"/>
+      </Unit14>
+      <Unit15>
+        <Filename Value="../../../../../../Development/FreePascal/lazarus/lcl/extctrls.pp"/>
+        <UnitName Value="ExtCtrls"/>
+        <EditorIndex Value="-1"/>
+        <TopLine Value="1016"/>
+        <CursorPos X="29" Y="1018"/>
+        <UsageCount Value="31"/>
+      </Unit15>
+      <Unit16>
+        <Filename Value="../../../../../../Development/FreePascal/lazarus/lcl/controls.pp"/>
+        <UnitName Value="Controls"/>
+        <EditorIndex Value="-1"/>
+        <TopLine Value="2275"/>
+        <CursorPos X="20" Y="2285"/>
+        <UsageCount Value="10"/>
+      </Unit16>
+      <Unit17>
+        <Filename Value="../../../../../../Development/FreePascal/lazarus/lcl/include/wincontrol.inc"/>
+        <EditorIndex Value="-1"/>
+        <TopLine Value="7744"/>
+        <CursorPos X="3" Y="7689"/>
+        <UsageCount Value="6"/>
+      </Unit17>
+      <Unit18>
+        <Filename Value="../../../expandpanels/to-do.txt"/>
+        <EditorIndex Value="2"/>
+        <CursorPos X="81" Y="23"/>
+        <UsageCount Value="35"/>
+        <Loaded Value="True"/>
+        <DefaultSyntaxHighlighter Value="Text"/>
+      </Unit18>
+      <Unit19>
+        <Filename Value="../../BCExpandPanels.txt"/>
+        <EditorIndex Value="1"/>
+        <CursorPos X="31"/>
+        <UsageCount Value="76"/>
+        <Loaded Value="True"/>
+        <DefaultSyntaxHighlighter Value="Text"/>
+      </Unit19>
+      <Unit20>
+        <Filename Value="../../../expandpanels/expandpanels_subpanel.pas"/>
+        <UnitName Value="ExpandPanels"/>
+        <EditorIndex Value="-1"/>
+        <TopLine Value="22"/>
+        <CursorPos Y="34"/>
+        <UsageCount Value="6"/>
+      </Unit20>
+      <Unit21>
+        <Filename Value="../../../expandpanels/_subpanel/expandpanels_subpanel.pas"/>
+        <UnitName Value="ExpandPanels"/>
+        <EditorIndex Value="-1"/>
+        <TopLine Value="2329"/>
+        <CursorPos X="12" Y="2308"/>
+        <UsageCount Value="8"/>
+      </Unit21>
+      <Unit22>
+        <Filename Value="../../../../../../Development/FreePascal/lazarus/lcl/include/custompanel.inc"/>
+        <EditorIndex Value="-1"/>
+        <TopLine Value="89"/>
+        <CursorPos X="3" Y="94"/>
+        <UsageCount Value="22"/>
+      </Unit22>
+      <Unit23>
+        <Filename Value="../../../../../../Development/FreePascal/lazarus/lcl/graphics.pp"/>
+        <UnitName Value="Graphics"/>
+        <EditorIndex Value="-1"/>
+        <TopLine Value="1162"/>
+        <CursorPos X="15" Y="1171"/>
+        <UsageCount Value="6"/>
+      </Unit23>
+      <Unit24>
+        <Filename Value="../../../../../../Development/FreePascal/lazarus/lcl/include/canvas.inc"/>
+        <EditorIndex Value="-1"/>
+        <TopLine Value="1034"/>
+        <CursorPos X="15" Y="1045"/>
+        <UsageCount Value="6"/>
+      </Unit24>
+      <Unit25>
+        <Filename Value="../../../../../../Development/FreePascal/lazarus/lcl/include/lclintfh.inc"/>
+        <EditorIndex Value="-1"/>
+        <TopLine Value="56"/>
+        <CursorPos X="10" Y="67"/>
+        <UsageCount Value="6"/>
+      </Unit25>
+      <Unit26>
+        <Filename Value="../../../../../../Development/FreePascal/lazarus/lcl/include/intfbaselcl.inc"/>
+        <EditorIndex Value="-1"/>
+        <TopLine Value="341"/>
+        <CursorPos X="3" Y="344"/>
+        <UsageCount Value="6"/>
+      </Unit26>
+      <Unit27>
+        <Filename Value="../../../expandpanels/developement test project/unit1.pas"/>
+        <ComponentName Value="Form1"/>
+        <HasResources Value="True"/>
+        <ResourceBaseClass Value="Form"/>
+        <UnitName Value="Unit1"/>
+        <EditorIndex Value="-1"/>
+        <TopLine Value="44"/>
+        <CursorPos Y="55"/>
+        <UsageCount Value="10"/>
+      </Unit27>
+      <Unit28>
+        <Filename Value="../../../../../../Development/FreePascal/lazarus/lcl/buttons.pp"/>
+        <UnitName Value="Buttons"/>
+        <EditorIndex Value="-1"/>
+        <TopLine Value="318"/>
+        <CursorPos X="17" Y="326"/>
+        <UsageCount Value="18"/>
+      </Unit28>
+      <Unit29>
+        <Filename Value="../../../expandpanels/developement test project/unit1_onepanel.lfm"/>
+        <EditorIndex Value="-1"/>
+        <TopLine Value="202"/>
+        <UsageCount Value="8"/>
+        <DefaultSyntaxHighlighter Value="LFM"/>
+      </Unit29>
+      <Unit30>
+        <Filename Value="../../../../../../Development/FreePascal/fpc/rtl/objpas/types.pp"/>
+        <UnitName Value="Types"/>
+        <EditorIndex Value="-1"/>
+        <TopLine Value="451"/>
+        <CursorPos X="3" Y="453"/>
+        <UsageCount Value="9"/>
+      </Unit30>
+      <Unit31>
+        <Filename Value="../../../../../../Development/FreePascal/lazarus/lcl/include/rasterimage.inc"/>
+        <EditorIndex Value="-1"/>
+        <TopLine Value="814"/>
+        <CursorPos Y="829"/>
+        <UsageCount Value="12"/>
+      </Unit31>
+      <Unit32>
+        <Filename Value="../../../../../../Development/FreePascal/lazarus/lcl/include/custombitmap.inc"/>
+        <EditorIndex Value="-1"/>
+        <TopLine Value="484"/>
+        <CursorPos Y="504"/>
+        <UsageCount Value="11"/>
+      </Unit32>
+      <Unit33>
+        <Filename Value="../../../../../../Development/FreePascal/fpc/rtl/objpas/math.pp"/>
+        <EditorIndex Value="-1"/>
+        <TopLine Value="2072"/>
+        <CursorPos X="3" Y="2075"/>
+        <UsageCount Value="11"/>
+      </Unit33>
+      <Unit34>
+        <Filename Value="../../../../../../Development/FreePascal/lazarus/lcl/stdctrls.pp"/>
+        <UnitName Value="StdCtrls"/>
+        <EditorIndex Value="-1"/>
+        <TopLine Value="1122"/>
+        <CursorPos X="3" Y="1127"/>
+        <UsageCount Value="10"/>
+      </Unit34>
+      <Unit35>
+        <Filename Value="../../../../../../Development/FreePascal/lazarus/lcl/include/customcontrol.inc"/>
+        <EditorIndex Value="-1"/>
+        <TopLine Value="89"/>
+        <CursorPos X="15" Y="92"/>
+        <UsageCount Value="10"/>
+      </Unit35>
+      <Unit36>
+        <Filename Value="../../../../../../Development/FreePascal/lazarus/lcl/widgetset/wscontrols.pp"/>
+        <UnitName Value="WSControls"/>
+        <EditorIndex Value="-1"/>
+        <TopLine Value="470"/>
+        <CursorPos X="10" Y="486"/>
+        <UsageCount Value="10"/>
+      </Unit36>
+      <Unit37>
+        <Filename Value="../../../../../../Development/FreePascal/lazarus/lcl/widgetset/wsfactory.pas"/>
+        <UnitName Value="WSFactory"/>
+        <EditorIndex Value="-1"/>
+        <TopLine Value="30"/>
+        <CursorPos X="10" Y="41"/>
+        <UsageCount Value="10"/>
+      </Unit37>
+      <Unit38>
+        <Filename Value="../../../../../../Development/FreePascal/lazarus/lcl/include/speedbutton.inc"/>
+        <EditorIndex Value="-1"/>
+        <TopLine Value="854"/>
+        <CursorPos X="3" Y="856"/>
+        <UsageCount Value="10"/>
+      </Unit38>
+      <Unit39>
+        <Filename Value="../../../../../../Development/FreePascal/lazarus/lcl/dialogs.pp"/>
+        <UnitName Value="Dialogs"/>
+        <EditorIndex Value="-1"/>
+        <TopLine Value="255"/>
+        <CursorPos X="31" Y="257"/>
+        <UsageCount Value="10"/>
+      </Unit39>
+      <Unit40>
+        <Filename Value="../../../../../../Development/FreePascal/lazarus/lcl/include/colorbutton.inc"/>
+        <EditorIndex Value="-1"/>
+        <CursorPos X="35" Y="127"/>
+        <UsageCount Value="10"/>
+      </Unit40>
+      <Unit41>
+        <Filename Value="../../../expandpanels/expandpanels_glyphs.lrs"/>
+        <EditorIndex Value="-1"/>
+        <UsageCount Value="10"/>
+      </Unit41>
+      <Unit42>
+        <Filename Value="../../BCExpandPanels.pas"/>
+        <EditorIndex Value="3"/>
+        <TopLine Value="593"/>
+        <CursorPos X="3" Y="597"/>
+        <UsageCount Value="10"/>
+        <Loaded Value="True"/>
+        <DefaultSyntaxHighlighter Value="Delphi"/>
+      </Unit42>
+      <Unit43>
+        <Filename Value="../../../../Projects/DigIt/DigIt_Twain32Comm.lpr"/>
+        <EditorIndex Value="4"/>
+        <TopLine Value="76"/>
+        <CursorPos X="16" Y="92"/>
+        <UsageCount Value="10"/>
+        <Loaded Value="True"/>
+      </Unit43>
+    </Units>
+    <JumpHistory Count="16" HistoryIndex="15">
+      <Position1>
+        <Filename Value="test_bcexpandpanel_unit1.pas"/>
+        <Caret Line="130" TopLine="116"/>
+      </Position1>
+      <Position2>
+        <Filename Value="test_bcexpandpanel_unit1.pas"/>
+        <Caret Line="129" TopLine="115"/>
+      </Position2>
+      <Position3>
+        <Filename Value="test_bcexpandpanel_unit1.pas"/>
+        <Caret Line="128" TopLine="114"/>
+      </Position3>
+      <Position4>
+        <Filename Value="test_bcexpandpanel_unit1.pas"/>
+        <Caret Line="127" TopLine="113"/>
+      </Position4>
+      <Position5>
+        <Filename Value="test_bcexpandpanel_unit1.pas"/>
+        <Caret Line="130" TopLine="116"/>
+      </Position5>
+      <Position6>
+        <Filename Value="test_bcexpandpanel_unit1.pas"/>
+        <Caret Line="9" Column="38"/>
+      </Position6>
+      <Position7>
+        <Filename Value="test_bcexpandpanel_unit1.pas"/>
+        <Caret Line="129" Column="23" TopLine="117"/>
+      </Position7>
+      <Position8>
+        <Filename Value="../../BCExpandPanels.pas"/>
+        <Caret Line="18" Column="36" TopLine="10"/>
+      </Position8>
+      <Position9>
+        <Filename Value="../../BCExpandPanels.pas"/>
+        <Caret Line="20" Column="21"/>
+      </Position9>
+      <Position10>
+        <Filename Value="../../BCExpandPanels.pas"/>
+        <Caret Line="2177" Column="10" TopLine="2163"/>
+      </Position10>
+      <Position11>
+        <Filename Value="../../BCExpandPanels.pas"/>
+        <Caret Line="2439" Column="10" TopLine="2426"/>
+      </Position11>
+      <Position12>
+        <Filename Value="../../BCExpandPanels.pas"/>
+        <Caret Line="2460" Column="11" TopLine="2447"/>
+      </Position12>
+      <Position13>
+        <Filename Value="test_bcexpandpanel_unit1.pas"/>
+        <Caret Column="24" TopLine="46"/>
+      </Position13>
+      <Position14>
+        <Filename Value="test_bcexpandpanel_unit1.pas"/>
+        <Caret Line="92" Column="17" TopLine="90"/>
+      </Position14>
+      <Position15>
+        <Filename Value="../../BCExpandPanels.pas"/>
+        <Caret Line="139" Column="59" TopLine="129"/>
+      </Position15>
+      <Position16>
+        <Filename Value="../../BCExpandPanels.pas"/>
+        <Caret Line="79" Column="20" TopLine="68"/>
+      </Position16>
+    </JumpHistory>
+  </ProjectOptions>
+  <CompilerOptions>
+    <Version Value="11"/>
+    <SearchPaths>
+      <IncludeFiles Value="$(ProjOutDir)"/>
+    </SearchPaths>
+    <Parsing>
+      <SyntaxOptions>
+        <IncludeAssertionCode Value="True"/>
+        <UseAnsiStrings Value="False"/>
+      </SyntaxOptions>
+    </Parsing>
+    <CodeGeneration>
+      <Checks>
+        <IOChecks Value="True"/>
+        <RangeChecks Value="True"/>
+        <OverflowChecks Value="True"/>
+        <StackChecks Value="True"/>
+      </Checks>
+      <VerifyObjMethodCallValidity Value="True"/>
+    </CodeGeneration>
+    <Linking>
+      <Debugging>
+        <DebugInfoType Value="dsDwarf3"/>
+        <UseHeaptrc Value="True"/>
+        <TrashVariables Value="True"/>
+        <UseExternalDbgSyms Value="True"/>
+      </Debugging>
+      <Options>
+        <Win32>
+          <GraphicApplication Value="True"/>
+        </Win32>
+      </Options>
+    </Linking>
+  </CompilerOptions>
+  <Debugging>
+    <BreakPoints Count="5">
+      <Item1>
+        <Kind Value="bpkSource"/>
+        <WatchScope Value="wpsLocal"/>
+        <WatchKind Value="wpkWrite"/>
+        <Source Value="../../../expandpanels/expandpanels.pas"/>
+        <Line Value="3362"/>
+      </Item1>
+      <Item2>
+        <Kind Value="bpkSource"/>
+        <WatchScope Value="wpsLocal"/>
+        <WatchKind Value="wpkWrite"/>
+        <Source Value="../../../expandpanels/expandpanels.pas"/>
+        <Line Value="3379"/>
+      </Item2>
+      <Item3>
+        <Kind Value="bpkSource"/>
+        <WatchScope Value="wpsLocal"/>
+        <WatchKind Value="wpkWrite"/>
+        <Source Value="../../../expandpanels/expandpanels.pas"/>
+        <Line Value="2964"/>
+      </Item3>
+      <Item4>
+        <Kind Value="bpkSource"/>
+        <WatchScope Value="wpsLocal"/>
+        <WatchKind Value="wpkWrite"/>
+        <Source Value="../../../expandpanels/expandpanels.pas"/>
+        <Line Value="3383"/>
+      </Item4>
+      <Item5>
+        <Kind Value="bpkSource"/>
+        <WatchScope Value="wpsLocal"/>
+        <WatchKind Value="wpkWrite"/>
+        <Source Value="../../../expandpanels/expandpanels.pas"/>
+        <Line Value="2973"/>
+      </Item5>
+    </BreakPoints>
+    <Exceptions Count="3">
+      <Item1>
+        <Name Value="EAbort"/>
+      </Item1>
+      <Item2>
+        <Name Value="ECodetoolError"/>
+      </Item2>
+      <Item3>
+        <Name Value="EFOpenError"/>
+      </Item3>
+    </Exceptions>
+  </Debugging>
+</CONFIG>

+ 16 - 0
test/test_bcExpandPanels/test_bcExpandPanel.lpr

@@ -0,0 +1,16 @@
+program test_bcExpandPanel;
+
+{$mode objfpc}{$H+}
+
+uses {$IFDEF UNIX} {$IFDEF UseCThreads}
+  cthreads, {$ENDIF} {$ENDIF}
+  Interfaces, // this includes the LCL widgetset
+  Forms,
+  test_bcExpandPanel_unit1,
+  LResources { you can add units after this };
+
+begin
+  Application.Initialize;
+  Application.CreateForm(TbcExpandPanelForm1, bcExpandPanelForm1);
+  Application.Run;
+end.

BIN
test/test_bcExpandPanels/test_bcExpandPanel.obj


+ 349 - 0
test/test_bcExpandPanels/test_bcexpandpanel_unit1.lfm

@@ -0,0 +1,349 @@
+object bcExpandPanelForm1: TbcExpandPanelForm1
+  Left = 355
+  Height = 623
+  Top = 15
+  Width = 549
+  Caption = 'bcExpandPanelForm1'
+  ClientHeight = 623
+  ClientWidth = 549
+  LCLVersion = '3.99.0.0'
+  OnShow = FormShow
+  object RColl: TRadioGroup
+    Left = 17
+    Height = 107
+    Top = 323
+    Width = 169
+    AutoFill = True
+    Caption = 'Collapse To'
+    ChildSizing.LeftRightSpacing = 6
+    ChildSizing.TopBottomSpacing = 6
+    ChildSizing.EnlargeHorizontal = crsHomogenousChildResize
+    ChildSizing.EnlargeVertical = crsHomogenousChildResize
+    ChildSizing.ShrinkHorizontal = crsScaleChilds
+    ChildSizing.ShrinkVertical = crsScaleChilds
+    ChildSizing.Layout = cclLeftToRightThenTopToBottom
+    ChildSizing.ControlsPerLine = 2
+    ClientHeight = 87
+    ClientWidth = 165
+    Columns = 2
+    ItemIndex = 0
+    Items.Strings = (
+      'top'
+      'left'
+      'right'
+      'bottom'
+    )
+    TabOrder = 0
+    OnClick = RCollClick
+  end
+  object RButt: TRadioGroup
+    Left = 17
+    Height = 86
+    Top = 427
+    Width = 169
+    AutoFill = True
+    Caption = 'Button Position'
+    ChildSizing.LeftRightSpacing = 6
+    ChildSizing.TopBottomSpacing = 6
+    ChildSizing.EnlargeHorizontal = crsHomogenousChildResize
+    ChildSizing.EnlargeVertical = crsHomogenousChildResize
+    ChildSizing.ShrinkHorizontal = crsScaleChilds
+    ChildSizing.ShrinkVertical = crsScaleChilds
+    ChildSizing.Layout = cclLeftToRightThenTopToBottom
+    ChildSizing.ControlsPerLine = 2
+    ClientHeight = 66
+    ClientWidth = 165
+    Columns = 2
+    ItemIndex = 0
+    Items.Strings = (
+      'top'
+      'left'
+      'right'
+      'bottom'
+    )
+    TabOrder = 1
+    OnClick = RButtClick
+  end
+  object RGlyph: TRadioGroup
+    Left = 17
+    Height = 80
+    Top = 536
+    Width = 169
+    AutoFill = True
+    Caption = 'Glyph Position'
+    ChildSizing.LeftRightSpacing = 6
+    ChildSizing.TopBottomSpacing = 6
+    ChildSizing.EnlargeHorizontal = crsHomogenousChildResize
+    ChildSizing.EnlargeVertical = crsHomogenousChildResize
+    ChildSizing.ShrinkHorizontal = crsScaleChilds
+    ChildSizing.ShrinkVertical = crsScaleChilds
+    ChildSizing.Layout = cclLeftToRightThenTopToBottom
+    ChildSizing.ControlsPerLine = 2
+    ClientHeight = 60
+    ClientWidth = 165
+    Columns = 2
+    ItemIndex = 1
+    Items.Strings = (
+      'Left'
+      'Right'
+      'None'
+    )
+    TabOrder = 2
+    OnClick = RGlyphClick
+  end
+  object GroupBox1: TGroupBox
+    Left = 193
+    Height = 152
+    Top = 323
+    Width = 169
+    Caption = 'Caption'
+    ClientHeight = 132
+    ClientWidth = 165
+    TabOrder = 3
+    object Edit1: TEdit
+      Left = 0
+      Height = 23
+      Top = 0
+      Width = 161
+      TabOrder = 0
+      Text = 'Click me to Collapse/Expand'
+      OnChange = Edit1Change
+    end
+    object SpeedButton1: TSpeedButton
+      Left = 0
+      Height = 22
+      Top = 24
+      Width = 161
+      Caption = 'Long Caption...'
+      OnClick = SpeedButton1Click
+    end
+    object RCapt: TRadioGroup
+      Left = 0
+      Height = 80
+      Top = 50
+      Width = 161
+      AutoFill = True
+      Caption = 'Caption Position'
+      ChildSizing.LeftRightSpacing = 6
+      ChildSizing.TopBottomSpacing = 6
+      ChildSizing.EnlargeHorizontal = crsHomogenousChildResize
+      ChildSizing.EnlargeVertical = crsHomogenousChildResize
+      ChildSizing.ShrinkHorizontal = crsScaleChilds
+      ChildSizing.ShrinkVertical = crsScaleChilds
+      ChildSizing.Layout = cclLeftToRightThenTopToBottom
+      ChildSizing.ControlsPerLine = 2
+      ClientHeight = 60
+      ClientWidth = 157
+      Columns = 2
+      ItemIndex = 0
+      Items.Strings = (
+        'Left'
+        'Right'
+        'Center'
+        'None'
+      )
+      TabOrder = 1
+      OnClick = RCaptClick
+    end
+  end
+  object edTabWidth: TSpinEdit
+    Left = 384
+    Height = 23
+    Top = 395
+    Width = 103
+    MaxValue = 380
+    MinValue = -90
+    TabOrder = 4
+    Value = -50
+    OnChange = edTabWidthChange
+  end
+  object Label1: TLabel
+    Left = 384
+    Height = 15
+    Top = 376
+    Width = 135
+    Caption = 'Tab Width (Negative is %)'
+    ParentColor = False
+  end
+  object cbRounded: TCheckBox
+    Left = 368
+    Height = 19
+    Top = 426
+    Width = 109
+    Caption = 'Rounded Borders'
+    Checked = True
+    State = cbChecked
+    TabOrder = 5
+    OnClick = cbRoundedClick
+  end
+  object cbFlat: TCheckBox
+    Left = 142
+    Height = 19
+    Top = 512
+    Width = 37
+    Caption = 'Flat'
+    TabOrder = 6
+    OnClick = cbFlatClick
+  end
+  object cbBorders: TComboBox
+    Left = 384
+    Height = 23
+    Top = 453
+    Width = 121
+    ItemHeight = 15
+    ItemIndex = 2
+    Items.Strings = (
+      'None'
+      'Lowered'
+      'Raised'
+      'Space'
+    )
+    Style = csDropDownList
+    TabOrder = 7
+    Text = 'Raised'
+    OnChange = cbBordersChange
+  end
+  object edButtonSize: TSpinEdit
+    Left = 72
+    Height = 23
+    Top = 509
+    Width = 70
+    TabOrder = 8
+    OnChange = edButtonSizeChange
+  end
+  object Label3: TLabel
+    Left = 40
+    Height = 15
+    Top = 512
+    Width = 23
+    Caption = 'Size:'
+    ParentColor = False
+  end
+  object RGlyphKind: TRadioGroup
+    Left = 193
+    Height = 80
+    Top = 536
+    Width = 169
+    AutoFill = True
+    Caption = 'Glyph Kind'
+    ChildSizing.LeftRightSpacing = 6
+    ChildSizing.TopBottomSpacing = 6
+    ChildSizing.EnlargeHorizontal = crsHomogenousChildResize
+    ChildSizing.EnlargeVertical = crsHomogenousChildResize
+    ChildSizing.ShrinkHorizontal = crsScaleChilds
+    ChildSizing.ShrinkVertical = crsScaleChilds
+    ChildSizing.Layout = cclLeftToRightThenTopToBottom
+    ChildSizing.ControlsPerLine = 2
+    ClientHeight = 60
+    ClientWidth = 165
+    Columns = 2
+    ItemIndex = 0
+    Items.Strings = (
+      'Arrows'
+      'Close'
+      'Min/Max'
+    )
+    TabOrder = 9
+    OnClick = RGlyphKindClick
+  end
+  object RStyle: TComboBox
+    Left = 368
+    Height = 23
+    Top = 346
+    Width = 176
+    ItemHeight = 15
+    ItemIndex = 0
+    Items.Strings = (
+      'Button'
+      'Tab'
+      'Line'
+      'Line Double'
+      'Line Top'
+      'Line Bottom'
+      'Line Double Top'
+      'Line Double Bottom'
+    )
+    Style = csDropDownList
+    TabOrder = 10
+    Text = 'Button'
+    OnChange = RStyleChange
+  end
+  object Label4: TLabel
+    Left = 369
+    Height = 15
+    Top = 327
+    Width = 31
+    Caption = 'Style :'
+    ParentColor = False
+  end
+  object p1: TBCExpandPanel
+    Left = 8
+    Height = 312
+    Top = 8
+    Width = 400
+    Background.Color = clBtnFace
+    Background.Gradient1.StartColor = clWhite
+    Background.Gradient1.EndColor = clBlack
+    Background.Gradient1.GradientType = gtLinear
+    Background.Gradient1.Point1XPercent = 0
+    Background.Gradient1.Point1YPercent = 0
+    Background.Gradient1.Point2XPercent = 0
+    Background.Gradient1.Point2YPercent = 100
+    Background.Gradient2.StartColor = clWhite
+    Background.Gradient2.EndColor = clBlack
+    Background.Gradient2.GradientType = gtLinear
+    Background.Gradient2.Point1XPercent = 0
+    Background.Gradient2.Point1YPercent = 0
+    Background.Gradient2.Point2XPercent = 0
+    Background.Gradient2.Point2YPercent = 100
+    Background.Gradient1EndPercent = 35
+    Background.Style = bbsColor
+    BevelInner = bvNone
+    BevelOuter = bvRaised
+    BevelWidth = 1
+    Border.Style = bboNone
+    Caption = 'Expand Panel 1'
+    Enabled = True
+    FontEx.Color = clDefault
+    FontEx.FontQuality = fqSystemClearType
+    FontEx.Shadow = False
+    FontEx.ShadowRadius = 5
+    FontEx.ShadowOffsetX = 5
+    FontEx.ShadowOffsetY = 5
+    FontEx.Style = []
+    ParentBackground = False
+    Rounding.RoundX = 1
+    Rounding.RoundY = 1
+    TabOrder = 11
+    TextAlignment = taCenter
+    CollapseKind = akTop
+    ExpandedSize = 312
+    ButtonPosition = akTop
+    ButtonSize = 27
+    Button.Left = 0
+    Button.Height = 27
+    Button.Top = 0
+    Button.Width = 400
+    Button.Caption = 'Click me to Collapse/Expand'
+    Button.Color = clSkyBlue
+    Button.ColorExpanded = 16287767
+    Button.GlyphLayout = glRight
+    AnimationSpeed = 20
+    object Edit2: TEdit
+      Left = 47
+      Height = 23
+      Top = 41
+      Width = 80
+      TabOrder = 0
+      Text = 'Edit2'
+    end
+    object Label2: TLabel
+      Left = 136
+      Height = 15
+      Top = 47
+      Width = 34
+      Caption = 'Label2'
+      ParentColor = False
+    end
+  end
+end

+ 113 - 0
test/test_bcExpandPanels/test_bcexpandpanel_unit1.lrs

@@ -0,0 +1,113 @@
+{ This is an automatically generated lazarus resource file }
+
+LazarusResources.Add('TbcExpandPanelForm1','FORMDATA',[
+  'TPF0'#19'TbcExpandPanelForm1'#18'bcExpandPanelForm1'#4'Left'#3'c'#1#6'Height'
+  +#3'o'#2#3'Top'#2#15#5'Width'#3'%'#2#7'Caption'#6#18'bcExpandPanelForm1'#12'C'
+  +'lientHeight'#3'o'#2#11'ClientWidth'#3'%'#2#10'LCLVersion'#6#8'3.99.0.0'#6'O'
+  +'nShow'#7#8'FormShow'#0#11'TRadioGroup'#5'RColl'#4'Left'#2#17#6'Height'#2'k'
+  +#3'Top'#3'C'#1#5'Width'#3#169#0#8'AutoFill'#9#7'Caption'#6#11'Collapse To'#28
+  +'ChildSizing.LeftRightSpacing'#2#6#28'ChildSizing.TopBottomSpacing'#2#6#29'C'
+  +'hildSizing.EnlargeHorizontal'#7#24'crsHomogenousChildResize'#27'ChildSizing'
+  +'.EnlargeVertical'#7#24'crsHomogenousChildResize'#28'ChildSizing.ShrinkHoriz'
+  +'ontal'#7#14'crsScaleChilds'#26'ChildSizing.ShrinkVertical'#7#14'crsScaleChi'
+  +'lds'#18'ChildSizing.Layout'#7#29'cclLeftToRightThenTopToBottom'#27'ChildSiz'
+  +'ing.ControlsPerLine'#2#2#12'ClientHeight'#2'W'#11'ClientWidth'#3#165#0#7'Co'
+  +'lumns'#2#2#9'ItemIndex'#2#0#13'Items.Strings'#1#6#3'top'#6#4'left'#6#5'righ'
+  +'t'#6#6'bottom'#0#8'TabOrder'#2#0#7'OnClick'#7#10'RCollClick'#0#0#11'TRadioG'
+  +'roup'#5'RButt'#4'Left'#2#17#6'Height'#2'V'#3'Top'#3#171#1#5'Width'#3#169#0#8
+  +'AutoFill'#9#7'Caption'#6#15'Button Position'#28'ChildSizing.LeftRightSpacin'
+  +'g'#2#6#28'ChildSizing.TopBottomSpacing'#2#6#29'ChildSizing.EnlargeHorizonta'
+  +'l'#7#24'crsHomogenousChildResize'#27'ChildSizing.EnlargeVertical'#7#24'crsH'
+  +'omogenousChildResize'#28'ChildSizing.ShrinkHorizontal'#7#14'crsScaleChilds'
+  +#26'ChildSizing.ShrinkVertical'#7#14'crsScaleChilds'#18'ChildSizing.Layout'#7
+  +#29'cclLeftToRightThenTopToBottom'#27'ChildSizing.ControlsPerLine'#2#2#12'Cl'
+  +'ientHeight'#2'B'#11'ClientWidth'#3#165#0#7'Columns'#2#2#9'ItemIndex'#2#0#13
+  +'Items.Strings'#1#6#3'top'#6#4'left'#6#5'right'#6#6'bottom'#0#8'TabOrder'#2#1
+  +#7'OnClick'#7#10'RButtClick'#0#0#11'TRadioGroup'#6'RGlyph'#4'Left'#2#17#6'He'
+  +'ight'#2'P'#3'Top'#3#24#2#5'Width'#3#169#0#8'AutoFill'#9#7'Caption'#6#14'Gly'
+  +'ph Position'#28'ChildSizing.LeftRightSpacing'#2#6#28'ChildSizing.TopBottomS'
+  +'pacing'#2#6#29'ChildSizing.EnlargeHorizontal'#7#24'crsHomogenousChildResize'
+  +#27'ChildSizing.EnlargeVertical'#7#24'crsHomogenousChildResize'#28'ChildSizi'
+  +'ng.ShrinkHorizontal'#7#14'crsScaleChilds'#26'ChildSizing.ShrinkVertical'#7
+  +#14'crsScaleChilds'#18'ChildSizing.Layout'#7#29'cclLeftToRightThenTopToBotto'
+  +'m'#27'ChildSizing.ControlsPerLine'#2#2#12'ClientHeight'#2'<'#11'ClientWidth'
+  +#3#165#0#7'Columns'#2#2#9'ItemIndex'#2#1#13'Items.Strings'#1#6#4'Left'#6#5'R'
+  +'ight'#6#4'None'#0#8'TabOrder'#2#2#7'OnClick'#7#11'RGlyphClick'#0#0#9'TGroup'
+  +'Box'#9'GroupBox1'#4'Left'#3#193#0#6'Height'#3#152#0#3'Top'#3'C'#1#5'Width'#3
+  +#169#0#7'Caption'#6#7'Caption'#12'ClientHeight'#3#132#0#11'ClientWidth'#3#165
+  +#0#8'TabOrder'#2#3#0#5'TEdit'#5'Edit1'#4'Left'#2#0#6'Height'#2#23#3'Top'#2#0
+  +#5'Width'#3#161#0#8'TabOrder'#2#0#4'Text'#6#27'Click me to Collapse/Expand'#8
+  +'OnChange'#7#11'Edit1Change'#0#0#12'TSpeedButton'#12'SpeedButton1'#4'Left'#2
+  +#0#6'Height'#2#22#3'Top'#2#24#5'Width'#3#161#0#7'Caption'#6#15'Long Caption.'
+  +'..'#7'OnClick'#7#17'SpeedButton1Click'#0#0#11'TRadioGroup'#5'RCapt'#4'Left'
+  +#2#0#6'Height'#2'P'#3'Top'#2'2'#5'Width'#3#161#0#8'AutoFill'#9#7'Caption'#6
+  +#16'Caption Position'#28'ChildSizing.LeftRightSpacing'#2#6#28'ChildSizing.To'
+  +'pBottomSpacing'#2#6#29'ChildSizing.EnlargeHorizontal'#7#24'crsHomogenousChi'
+  +'ldResize'#27'ChildSizing.EnlargeVertical'#7#24'crsHomogenousChildResize'#28
+  +'ChildSizing.ShrinkHorizontal'#7#14'crsScaleChilds'#26'ChildSizing.ShrinkVer'
+  +'tical'#7#14'crsScaleChilds'#18'ChildSizing.Layout'#7#29'cclLeftToRightThenT'
+  +'opToBottom'#27'ChildSizing.ControlsPerLine'#2#2#12'ClientHeight'#2'<'#11'Cl'
+  +'ientWidth'#3#157#0#7'Columns'#2#2#9'ItemIndex'#2#0#13'Items.Strings'#1#6#4
+  +'Left'#6#5'Right'#6#6'Center'#6#4'None'#0#8'TabOrder'#2#1#7'OnClick'#7#10'RC'
+  +'aptClick'#0#0#0#9'TSpinEdit'#10'edTabWidth'#4'Left'#3#128#1#6'Height'#2#23#3
+  +'Top'#3#139#1#5'Width'#2'g'#8'MaxValue'#3'|'#1#8'MinValue'#2#166#8'TabOrder'
+  +#2#4#5'Value'#2#206#8'OnChange'#7#16'edTabWidthChange'#0#0#6'TLabel'#6'Label'
+  +'1'#4'Left'#3#128#1#6'Height'#2#15#3'Top'#3'x'#1#5'Width'#3#135#0#7'Caption'
+  +#6#25'Tab Width (Negative is %)'#11'ParentColor'#8#0#0#9'TCheckBox'#9'cbRoun'
+  +'ded'#4'Left'#3'p'#1#6'Height'#2#19#3'Top'#3#170#1#5'Width'#2'm'#7'Caption'#6
+  +#15'Rounded Borders'#7'Checked'#9#5'State'#7#9'cbChecked'#8'TabOrder'#2#5#7
+  +'OnClick'#7#14'cbRoundedClick'#0#0#9'TCheckBox'#6'cbFlat'#4'Left'#3#142#0#6
+  +'Height'#2#19#3'Top'#3#0#2#5'Width'#2'%'#7'Caption'#6#4'Flat'#8'TabOrder'#2#6
+  +#7'OnClick'#7#11'cbFlatClick'#0#0#9'TComboBox'#9'cbBorders'#4'Left'#3#128#1#6
+  +'Height'#2#23#3'Top'#3#197#1#5'Width'#2'y'#10'ItemHeight'#2#15#9'ItemIndex'#2
+  +#2#13'Items.Strings'#1#6#4'None'#6#7'Lowered'#6#6'Raised'#6#5'Space'#0#5'Sty'
+  +'le'#7#14'csDropDownList'#8'TabOrder'#2#7#4'Text'#6#6'Raised'#8'OnChange'#7
+  +#15'cbBordersChange'#0#0#9'TSpinEdit'#12'edButtonSize'#4'Left'#2'H'#6'Height'
+  +#2#23#3'Top'#3#253#1#5'Width'#2'F'#8'TabOrder'#2#8#8'OnChange'#7#18'edButton'
+  +'SizeChange'#0#0#6'TLabel'#6'Label3'#4'Left'#2'('#6'Height'#2#15#3'Top'#3#0#2
+  ,#5'Width'#2#23#7'Caption'#6#5'Size:'#11'ParentColor'#8#0#0#11'TRadioGroup'#10
+  +'RGlyphKind'#4'Left'#3#193#0#6'Height'#2'P'#3'Top'#3#24#2#5'Width'#3#169#0#8
+  +'AutoFill'#9#7'Caption'#6#10'Glyph Kind'#28'ChildSizing.LeftRightSpacing'#2#6
+  +#28'ChildSizing.TopBottomSpacing'#2#6#29'ChildSizing.EnlargeHorizontal'#7#24
+  +'crsHomogenousChildResize'#27'ChildSizing.EnlargeVertical'#7#24'crsHomogenou'
+  +'sChildResize'#28'ChildSizing.ShrinkHorizontal'#7#14'crsScaleChilds'#26'Chil'
+  +'dSizing.ShrinkVertical'#7#14'crsScaleChilds'#18'ChildSizing.Layout'#7#29'cc'
+  +'lLeftToRightThenTopToBottom'#27'ChildSizing.ControlsPerLine'#2#2#12'ClientH'
+  +'eight'#2'<'#11'ClientWidth'#3#165#0#7'Columns'#2#2#9'ItemIndex'#2#0#13'Item'
+  +'s.Strings'#1#6#6'Arrows'#6#5'Close'#6#7'Min/Max'#0#8'TabOrder'#2#9#7'OnClic'
+  +'k'#7#15'RGlyphKindClick'#0#0#9'TComboBox'#6'RStyle'#4'Left'#3'p'#1#6'Height'
+  +#2#23#3'Top'#3'Z'#1#5'Width'#3#176#0#10'ItemHeight'#2#15#9'ItemIndex'#2#0#13
+  +'Items.Strings'#1#6#6'Button'#6#3'Tab'#6#4'Line'#6#11'Line Double'#6#8'Line '
+  +'Top'#6#11'Line Bottom'#6#15'Line Double Top'#6#18'Line Double Bottom'#0#5'S'
+  +'tyle'#7#14'csDropDownList'#8'TabOrder'#2#10#4'Text'#6#6'Button'#8'OnChange'
+  +#7#12'RStyleChange'#0#0#6'TLabel'#6'Label4'#4'Left'#3'q'#1#6'Height'#2#15#3
+  +'Top'#3'G'#1#5'Width'#2#31#7'Caption'#6#7'Style :'#11'ParentColor'#8#0#0#14
+  +'TBCExpandPanel'#2'p1'#4'Left'#2#8#6'Height'#3'8'#1#3'Top'#2#8#5'Width'#3#144
+  +#1#16'Background.Color'#7#9'clBtnFace'#31'Background.Gradient1.StartColor'#7
+  +#7'clWhite'#29'Background.Gradient1.EndColor'#7#7'clBlack!Background.Gradien'
+  +'t1.GradientType'#7#8'gtLinear#Background.Gradient1.Point1XPercent'#5#0#0#0#0
+  +#0#0#0#128#0'<#Background.Gradient1.Point1YPercent'#5#0#0#0#0#0#0#0#128#0'<#'
+  +'Background.Gradient1.Point2XPercent'#5#0#0#0#0#0#0#0#128#0'<#Background.Gra'
+  +'dient1.Point2YPercent'#5#0#0#0#0#0#0#0#200#5'@'#31'Background.Gradient2.Sta'
+  +'rtColor'#7#7'clWhite'#29'Background.Gradient2.EndColor'#7#7'clBlack!Backgro'
+  +'und.Gradient2.GradientType'#7#8'gtLinear#Background.Gradient2.Point1XPercen'
+  +'t'#5#0#0#0#0#0#0#0#128#0'<#Background.Gradient2.Point1YPercent'#5#0#0#0#0#0
+  +#0#0#128#0'<#Background.Gradient2.Point2XPercent'#5#0#0#0#0#0#0#0#128#0'<#Ba'
+  +'ckground.Gradient2.Point2YPercent'#5#0#0#0#0#0#0#0#200#5'@'#30'Background.G'
+  +'radient1EndPercent'#5#0#0#0#0#0#0#0#140#4'@'#16'Background.Style'#7#8'bbsCo'
+  +'lor'#10'BevelInner'#7#6'bvNone'#10'BevelOuter'#7#8'bvRaised'#10'BevelWidth'
+  +#2#1#12'Border.Style'#7#7'bboNone'#7'Caption'#6#14'Expand Panel 1'#7'Enabled'
+  +#9#12'FontEx.Color'#7#9'clDefault'#18'FontEx.FontQuality'#7#17'fqSystemClear'
+  +'Type'#13'FontEx.Shadow'#8#19'FontEx.ShadowRadius'#2#5#20'FontEx.ShadowOffse'
+  +'tX'#2#5#20'FontEx.ShadowOffsetY'#2#5#12'FontEx.Style'#11#0#16'ParentBackgro'
+  +'und'#8#15'Rounding.RoundX'#2#1#15'Rounding.RoundY'#2#1#8'TabOrder'#2#11#13
+  +'TextAlignment'#7#8'taCenter'#12'CollapseKind'#7#5'akTop'#12'ExpandedSize'#3
+  +'8'#1#14'ButtonPosition'#7#5'akTop'#10'ButtonSize'#2#27#11'Button.Left'#2#0
+  +#13'Button.Height'#2#27#10'Button.Top'#2#0#12'Button.Width'#3#144#1#14'Butto'
+  +'n.Caption'#6#27'Click me to Collapse/Expand'#12'Button.Color'#7#9'clSkyBlue'
+  +#20'Button.ColorExpanded'#4#23#136#248#0#18'Button.GlyphLayout'#7#7'glRight'
+  +#14'AnimationSpeed'#5#0#0#0#0#0#0#0#160#3'@'#0#5'TEdit'#5'Edit2'#4'Left'#2'/'
+  +#6'Height'#2#23#3'Top'#2')'#5'Width'#2'P'#8'TabOrder'#2#0#4'Text'#6#5'Edit2'
+  +#0#0#6'TLabel'#6'Label2'#4'Left'#3#136#0#6'Height'#2#15#3'Top'#2'/'#5'Width'
+  +#2'"'#7'Caption'#6#6'Label2'#11'ParentColor'#8#0#0#0#0
+]);

+ 144 - 0
test/test_bcExpandPanels/test_bcexpandpanel_unit1.pas

@@ -0,0 +1,144 @@
+unit test_bcExpandPanel_unit1;
+
+{$mode objfpc}{$H+}
+
+interface
+
+uses
+  Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics,
+  ExtCtrls, StdCtrls, Buttons, Spin, BCExpandPanels, StrUtils;
+
+type
+
+  { TbcExpandPanelForm1 }
+
+  TbcExpandPanelForm1 = class(TForm)
+    cbRounded: TCheckBox;
+    cbFlat: TCheckBox;
+    cbBorders: TComboBox;
+    Edit1: TEdit;
+    Edit2: TEdit;
+    GroupBox1: TGroupBox;
+    Label1: TLabel;
+    Label2: TLabel;
+    Label3: TLabel;
+    Label4: TLabel;
+    p1: TBCExpandPanel;
+    RGlyph: TRadioGroup;
+    RCapt: TRadioGroup;
+    RColl:      TRadioGroup;
+    RButt:      TRadioGroup;
+    RGlyphKind: TRadioGroup;
+    RStyle: TComboBox;
+    SpeedButton1: TSpeedButton;
+    edTabWidth: TSpinEdit;
+    edButtonSize: TSpinEdit;
+    procedure cbFlatClick(Sender: TObject);
+    procedure cbRoundedClick(Sender: TObject);
+    procedure cbBordersChange(Sender: TObject);
+    procedure edButtonSizeChange(Sender: TObject);
+    procedure Edit1Change(Sender: TObject);
+    procedure edTabWidthChange(Sender: TObject);
+    procedure FormShow(Sender: TObject);
+    procedure RGlyphClick(Sender: TObject);
+    procedure RCaptClick(Sender: TObject);
+    procedure RButtClick(Sender: TObject);
+    procedure RCollClick(Sender: TObject);
+    procedure RGlyphKindClick(Sender: TObject);
+    procedure RStyleChange(Sender: TObject);
+    procedure RDirectionClick(Sender: TObject);
+    procedure SpeedButton1Click(Sender: TObject);
+  private
+    { private declarations }
+  public
+    { public declarations }
+  end;
+
+var
+  bcExpandPanelForm1: TbcExpandPanelForm1;
+
+implementation
+
+{ TbcExpandPanelForm1 }
+
+
+procedure TbcExpandPanelForm1.Edit1Change(Sender: TObject);
+begin
+   p1.Button.Caption := Edit1.Text;
+end;
+
+procedure TbcExpandPanelForm1.cbRoundedClick(Sender: TObject);
+begin
+  p1.BevelRounded:=cbRounded.Checked;
+end;
+
+procedure TbcExpandPanelForm1.cbBordersChange(Sender: TObject);
+begin
+  p1.BevelOuter:=TBevelcut(cbBorders.ItemIndex);
+end;
+
+procedure TbcExpandPanelForm1.edButtonSizeChange(Sender: TObject);
+begin
+  p1.ButtonSize:=edButtonSize.Value;
+end;
+
+procedure TbcExpandPanelForm1.cbFlatClick(Sender: TObject);
+begin
+  p1.Button.Flat:=cbFlat.Checked;
+end;
+
+procedure TbcExpandPanelForm1.edTabWidthChange(Sender: TObject);
+begin
+  p1.Button.TabWidth:=edTabWidth.Value;
+end;
+
+procedure TbcExpandPanelForm1.FormShow(Sender: TObject);
+begin
+  edButtonSize.Value:=p1.ButtonSize;
+  edTabWidth.Value:=p1.Button.TabWidth;
+end;
+
+procedure TbcExpandPanelForm1.RGlyphClick(Sender: TObject);
+begin
+  p1.Button.GlyphLayout:=TGlyphLayout(RGlyph.ItemIndex);
+end;
+
+procedure TbcExpandPanelForm1.RCaptClick(Sender: TObject);
+begin
+     p1.Button.TextLayout:=TTextLayout(RCapt.ItemIndex);
+end;
+
+
+procedure TbcExpandPanelForm1.RButtClick(Sender: TObject);
+begin
+  p1.ButtonPosition := TAnchorKind(RButt.ItemIndex);
+end;
+
+procedure TbcExpandPanelForm1.RCollClick(Sender: TObject);
+begin
+  p1.CollapseKind := TAnchorKind(RColl.ItemIndex);
+end;
+
+procedure TbcExpandPanelForm1.RGlyphKindClick(Sender: TObject);
+begin
+  p1.Button.GlyphKind:=TGlyphKind(RGlyphKind.ItemIndex);
+end;
+
+procedure TbcExpandPanelForm1.RStyleChange(Sender: TObject);
+begin
+  p1.Button.Style:=TBCBoundButtonStyle(RStyle.ItemIndex);
+end;
+
+procedure TbcExpandPanelForm1.RDirectionClick(Sender: TObject);
+begin
+end;
+
+procedure TbcExpandPanelForm1.SpeedButton1Click(Sender: TObject);
+begin
+     p1.Button.Caption := DupeString(Edit1.Caption, 10);
+end;
+
+initialization
+  {$I test_bcexpandpanel_unit1.lrs}
+
+end.