View Issue Details

IDProjectCategoryView StatusLast Update
0003902JEDI VCL00 JVCL Componentspublic2007-01-04 03:59
ReporterdraderAssigned Toobones 
Status resolvedResolutionfixed 
Product VersionDaily / GIT 
Target VersionFixed in Version3.30 
Summary0003902: CustomDock Layout Loading 2
DescriptionIn the unit jvDockTree, the function
procedure TJvDockTree.SetDockSiteSize(const Value: Integer);
dosn't handle the CustomDock orientation.

This Doesn't allow to reload a saved layout that includes CustomDocked forms.
I suggest to change the function as in the additional information.
Additional Informationprocedure TJvDockTree.SetDockSiteSize(const Value: Integer);
    if DockSite.Align in [alRight, alBottom] then
      DockSiteBegin := DockSiteBegin - (Value - DockSiteSize);
    case DockSiteOrientation of
        DockSite.Width := Value;
        DockSite.Height := Value;
    // Add the handling of customDock orientation avoiding the
    // raising of the exception
     // ******************************************
// raise Exception.CreateRes(@RsEDockCannotSetValueWithNoOrient);
     // ******************************************
TagsNo tags attached.


has duplicate 0004000 closed "Cannot set data of control that has no dock orientation" message when loading layout with form docked at CustomDockPanel 



2006-09-29 06:49

administrator   ~0010241

I don't understand. You are just removing the exception, but where is the handling itself?


2006-09-30 05:47

reporter   ~0010261

You are right .... there ins't any handling code.
The fact is that, in my application, it works fine also whithout specific handling.
I didn't had the possibility to test more general cases.


2006-09-30 05:52

reporter   ~0010262

Normaly in CustomDock orientation the dock Align is alClient, then it shouldn't need to set DockSite Width and height.


2006-10-06 02:37

administrator   ~0010299

hum... I'm a bit uneasy to remove the exception without extended testing. Can you do this with the examples from the JVCL?


2006-10-06 11:49

reporter   ~0010324

Last edited: 2006-10-07 16:05

Using the Jedi demo DockingInCode, if you create a TabDock, save the Layout, reload the layout, you get the above mentioned exception.
I checked more deeply all the code and I agree to leave this exception;
Anyway when we have the DockSite aligned to alClient, it doesn't make sense to calculate the dockSite size so we shouldn't call the
procedure TJvDockTree.SetDockSiteSize(const Value: Integer);

I suggest the the following change:

unit JvDockInfo

  procedure SetDockSiteSize(DockSite: TJvDockPanel);
  // if we have a docksite aligned to alClient it's unnecessary
  // to set the DockSite Size
   if DockSite.Align = alClient then

    if DockSite.Align in [alTop, alBottom] then
      DockSite.JvDockManager.DockSiteSize := DockRect.Bottom - DockRect.Top
      DockSite.JvDockManager.DockSiteSize := DockRect.Right - DockRect.Left;


2007-01-04 03:58

administrator   ~0010520

This is now in SVN.

Issue History

Date Modified Username Field Change
2006-09-13 09:46 drader New Issue
2006-09-29 06:49 obones Note Added: 0010241
2006-09-29 06:49 obones Status new => feedback
2006-09-30 05:47 drader Note Added: 0010261
2006-09-30 05:52 drader Note Added: 0010262
2006-10-06 02:37 obones Note Added: 0010299
2006-10-06 11:49 drader Note Added: 0010324
2006-10-07 16:05 drader Note Edited: 0010324
2007-01-04 03:58 obones Status feedback => resolved
2007-01-04 03:58 obones Fixed in Version => Daily / SVN
2007-01-04 03:58 obones Resolution open => fixed
2007-01-04 03:58 obones Assigned To => obones
2007-01-04 03:58 obones Note Added: 0010520
2007-01-05 01:07 obones Relationship added has duplicate 0004000