View Issue Details

IDProjectCategoryView StatusLast Update
0001685JEDI VCL99 Otherpublic2004-08-23 07:46
ReporterbugfinderAssigned Touser72 
PrioritynormalSeverityfeatureReproducibilityalways
Status resolvedResolutionfixed 
Product Version 
Target VersionFixed in Version 
Summary0001685: Docking example request
DescriptionYou have a number of good docking examples, but the one thing missing is a programmatical docking example. Eg, say create Form1, and Form2, where form2, is pre-docked on creation...
Additional InformationIm struggling to make this work.. it would help a lot to see an example of some code to dock 1 form to another.
TagsNo tags attached.

Activities

user72

2004-04-23 06:00

  ~0004031

If you have access to the newsgroups, there is an example posted a coouple of weeks ago. Just search for "docking" in your newsreader and you should find it.

But I agree that we should probably add an example showing how it's done (I'm not even sure myself what is the best way of doing it)

miracle2k

2004-04-24 01:23

reporter   ~0004045

The MSDN demo creates the forms programmtical if no DockLayout.ini is existing, see:
TMSDN2002.DefaultDockLayout();

user72

2004-04-24 05:05

  ~0004054

I actually wrote that code but I don't know if that is the best way of doing it...

2004-05-05 14:46

 

AdvanceDemo.zip (50,649 bytes)

cpall

2004-05-05 14:46

reporter   ~0004159

I was looking at AdvanceDemo:

.\jvcl\dev\jvcl3\examples\JvDocking\AdvanceDemo

and I noticed that the example was VERY slightly broken. The lbDockClient1.DockStyle was not set for the delphi or the VC style forms. I set the property and added a speedbutton to close all the windows and remove the menuitems related to the windows.

I'm a little confused, the AdvanceDemo calls some methods to store the state of the docked forms but it doesn't seem to work. Bug? Any ideas?

user72

2004-05-06 00:42

  ~0004163

>I'm a little confused, the AdvanceDemo
>calls some methods to store the state of the
>docked forms but it doesn't seem to work. Bug? Any ideas?
It's a bug. It seems the use of AppStoragePath is incorrect. You can fix it like this (I think this should work for all uses):

In JvDockInfo.TJvDockInfoTree, add a reader for AppStoragePath:
...
    property AppStoragePath: string read GetAppStoragePath write FAppStoragePath;
...

implement like this:

function TJvDockInfoTree.GetAppStoragePath: string;
begin
  Result := FAppStoragePath;
  if (Result = '') and (FAppStorage <> nil) then
    Result := FAppStorage.Path;
end;

Replace all other uses in JvDockInfo.pas of "FAppStoragePath" with "AppStoragePath".

cpall

2004-05-06 06:28

reporter   ~0004166

I'm new here, pardon me for asking, but who puts your fix in cvs now? How long typically does it take? How about my contribution to the example?

cpall

2004-05-06 06:37

reporter   ~0004167

Well, it just hit me that you probably won't commit it until you get feedback (hence the status) about the success of the fix. So I went forth and made the changes and it worked beautifully. Awesome. Hah. It's quite a bizzarre change for me. (Understand at my workplace we just update the cvs tree willy nilly causing all sort of havoc)

user72

2004-05-06 11:04

  ~0004173

Yes, good you tested. I'll commit the changes (it also needs some IFDEF USEJVCL) and your updates as well tomorrow

user72

2004-05-06 23:55

  ~0004175

I've updated CVS with the modified demo as well as the AppStoragePath update.

bugfinder

2004-08-23 07:46

reporter   ~0005067

Reminder sent to peter3

Um, sorry to bother you, but, Ive been playing with this since you redid the example and I still havent succeeded in one thing.

In the example and in other examples it uses restorechild to switch between docked and undocked.

However, firstime app runs, I cant find a way to force it to be associated and docked.. forgive me for contacting you in this way but I didnt feel opening the bug again was worth it, and I apologise for the delay (had job, lost job)

Issue History

Date Modified Username Field Change
2004-04-23 04:35 bugfinder New Issue
2004-04-23 06:00 user72 Note Added: 0004031
2004-04-23 06:00 user72 Status new => acknowledged
2004-04-24 01:23 miracle2k Note Added: 0004045
2004-04-24 05:05 user72 Note Added: 0004054
2004-05-05 14:46 cpall File Added: AdvanceDemo.zip
2004-05-05 14:46 cpall Note Added: 0004159
2004-05-06 00:42 user72 Note Added: 0004163
2004-05-06 00:42 user72 Status acknowledged => assigned
2004-05-06 00:42 user72 Assigned To => user72
2004-05-06 00:42 user72 Status assigned => feedback
2004-05-06 06:28 cpall Note Added: 0004166
2004-05-06 06:37 cpall Note Added: 0004167
2004-05-06 11:04 user72 Note Added: 0004173
2004-05-06 23:55 user72 Note Added: 0004175
2004-05-06 23:55 user72 Status feedback => acknowledged
2004-06-25 05:04 user72 Status acknowledged => resolved
2004-06-25 05:04 user72 Resolution open => fixed
2004-08-23 07:46 bugfinder Note Added: 0005067