--- JvXPContainer.pas.orig	2004-01-31 10:50:48.000000000 -0800
+++ JvXPContainer.pas	2004-03-21 05:12:34.000000000 -0800
@@ -30,76 +30,62 @@
 {$I jvcl.inc}
 
 interface
 
 uses
-  {$IFDEF COMPILER6_UP}
   TypInfo,
-  {$ENDIF COMPILER6_UP}
   Windows, Classes, Controls, Graphics, StdCtrls,
   JvXPCore, JvXPCoreUtils;
 
 type
   TJvXPPaintEvent = procedure(Sender: TObject; Rect: TRect; ACanvas: TCanvas;
     AFont: TFont) of object;
 
-  {$IFDEF COMPILER6_UP}
   TJvXPEnabledMode = (emAffectChilds, emNormal);
-  {$ENDIF COMPILER6_UP}
 
   TJvXPCustomContainer = class(TJvXPCustomControl)
   private
     FAlignment: TAlignment;
     FBorderWidth: TBorderWidth;
     FBoundColor: TColor;
     FBoundLines: TJvXPBoundLines;
-    {$IFDEF COMPILER6_UP}
     FEnabledMode: TJvXPEnabledMode;
-    {$ENDIF COMPILER6_UP}
     FFocusable: Boolean;
     FGlyph: TBitmap;
     FGlyphLayout: TJvXPGlyphLayout;
     FLayout: TTextLayout;
     FShowBoundLines: Boolean;
     FShowCaption: Boolean;
     FSpacing: Byte;
     FWordWrap: Boolean;
-    {$IFDEF COMPILER6_UP}
     FOnEnabledChanged: TNotifyEvent;
-    {$ENDIF COMPILER6_UP}
     FOnPaint: TJvXPPaintEvent;
     procedure SetAlignment(Value: TAlignment);
     procedure SetBorderWidth(Value: TBorderWidth);
     procedure SetBoundColor(Value: TColor);
     procedure SetBoundLines(Value: TJvXPBoundLines);
-    {$IFDEF COMPILER6_UP}
     procedure SetEnabledMode(Value: TJvXPEnabledMode);
-    {$ENDIF COMPILER6_UP}
     procedure SetGlyph(Value: TBitmap);
     procedure SetGlyphLayout(Value: TJvXPGlyphLayout);
     procedure SetLayout(Value: TTextLayout);
     procedure SetShowBoundLines(Value: Boolean);
     procedure SetShowCaption(Value: Boolean);
     procedure SetSpacing(Value: Byte);
     procedure SetWordWrap(Value: Boolean);
   protected
     procedure CreateParams(var Params: TCreateParams); override;
     procedure AdjustClientRect(var Rect: TRect); override;
-    {$IFDEF COMPILER6_UP}
     procedure HookEnabledChanged; override;
-    {$ENDIF COMPILER6_UP}
     procedure HookMouseDown; override;
     procedure HookPosChanged; override;
     procedure Paint; override;
     property Alignment: TAlignment read FAlignment write SetAlignment default taCenter;
     property BorderWidth: TBorderWidth read FBorderWidth write SetBorderWidth default 0;
     property BoundColor: TColor read FBoundColor write SetBoundColor default clGray;
     property BoundLines: TJvXPBoundLines read FBoundLines write SetBoundLines default [];
-    {$IFDEF COMPILER6_UP}
     property EnabledMode: TJvXPEnabledMode read FEnabledMode write SetEnabledMode
       default emNormal;
-    {$ENDIF COMPILER6_UP}
     property Focusable: Boolean read FFocusable write FFocusable default False;
     property Glyph: TBitmap read FGlyph write SetGlyph;
     property GlyphLayout: TJvXPGlyphLayout read FGlyphLayout write SetGlyphLayout
       default glCenter;
     property Layout: TTextLayout read FLayout write SetLayout default tlCenter;
@@ -109,13 +95,11 @@
     property ShowCaption: Boolean read FShowCaption write SetShowCaption
       default False;
     property Spacing: Byte read FSpacing write SetSpacing default 5;
     property Width default 185;
     property WordWrap: Boolean read FWordWrap write SetWordWrap default False;
-    {$IFDEF COMPILER6_UP}
     property OnEnabledChanged: TNotifyEvent read FOnEnabledChanged write FOnEnabledChanged;
-    {$ENDIF COMPILER6_UP}
     property OnPaint: TJvXPPaintEvent read FOnPaint write FOnPaint;
   public
     constructor Create(AOwner: TComponent); override;
     destructor Destroy; override;
   end;
@@ -128,25 +112,21 @@
     property BoundColor;
     property BoundLines;
     property Caption;
     property Color;
     property Enabled;
-    {$IFDEF COMPILER6_UP}
     property EnabledMode;
-    {$ENDIF COMPILER6_UP}
     property Focusable;
     property Glyph;
     property GlyphLayout;
     property Layout;
     property ParentColor;
     property ShowBoundLines;
     property ShowCaption;
     property Spacing;
     property WordWrap;
-    {$IFDEF COMPILER6_UP}
     property OnEnabledChanged;
-    {$ENDIF COMPILER6_UP}
     property OnDblClick;
     property OnPaint;
     property OnResize;
 
     //property BevelInner;
@@ -181,13 +161,13 @@
     //property OnStartDock;
     //property OnUnDock;
     property OnCanResize;
     property OnClick;
     property OnConstrainedResize;
-    {$IFDEF COMPILER6_UP}
+    {$IFDEF COMPILER5_UP}
     property OnContextPopup;
-    {$ENDIF COMPILER6_UP}
+    {$ENDIF COMPILER5_UP}
     property OnDragDrop;
     property OnDragOver;
     property OnEndDrag;
     property OnEnter;
     property OnExit;
@@ -213,13 +193,11 @@
   Height := 41;
   Width := 185;
   FAlignment := taCenter;
   FBoundColor := clGray;
   FBoundLines := [];
-  {$IFDEF COMPILER6_UP}
   FEnabledMode := emNormal;
-  {$ENDIF COMPILER6_UP}
   FFocusable := False;
   FGlyph := TBitmap.Create;
   FGlyph.Assign(nil);
   FGlyphLayout := glCenter;
   FLayout := tlCenter;
@@ -240,26 +218,29 @@
   inherited CreateParams(Params);
   with Params do
     WindowClass.Style := WindowClass.Style and not (CS_HREDRAW or CS_VREDRAW);
 end;
 
-{$IFDEF COMPILER6_UP}
 procedure TJvXPCustomContainer.HookEnabledChanged;
 const
  cEnabled = 'Enabled';
 var
   I: Integer;
+  control: TControl;
+  propinfo: PPropInfo;
 begin
   inherited HookEnabledChanged;
   if FEnabledMode = emAffectChilds then
-    for I := 0 to ControlCount - 1 do
-      if IsPublishedProp(Controls[I], cEnabled) then
-        SetPropValue(Controls[I], cEnabled, Enabled);
+    for I := 0 to ControlCount - 1 do begin
+      control:= Controls[I];
+      propinfo:= GetPropInfo(control, cEnabled, [tkEnumeration]);
+      if Assigned(propinfo) and (propinfo.PropType^ = typeinfo(Boolean)) then
+        SetOrdProp(control, propinfo, Ord(Enabled));
+    end;
   if Assigned(FOnEnabledChanged) then
     FOnEnabledChanged(Self);
 end;
-{$ENDIF COMPILER6_UP}
 
 procedure TJvXPCustomContainer.HookMouseDown;
 begin
   if FFocusable then
     inherited HookMouseDown
@@ -320,20 +301,18 @@
     Realign;
     InternalRedraw;
   end;
 end;
 
-{$IFDEF COMPILER6_UP}
 procedure TJvXPCustomContainer.SetEnabledMode(Value: TJvXPEnabledMode);
 begin
   if Value <> FEnabledMode then
   begin
     FEnabledMode := Value;
     HookEnabledChanged;
   end;
 end;
-{$ENDIF COMPILER6_UP}
 
 procedure TJvXPCustomContainer.SetGlyph(Value: TBitmap);
 begin
   if Value <> FGlyph then
   begin
