|Anonymous | Login | Signup for a new account||2019-04-19 03:23 CEST|
|Main | My View | View Issues | Change Log | Roadmap | Docs|
|Viewing Issue Simple Details|
|ID||Category||Severity||Reproducibility||Date Submitted||Last Update|
|0005974||[JEDI VCL] 00 JVCL Components||minor||have not tried||2012-08-31 11:05||2013-01-15 15:30|
|Priority||normal||Resolution||no change required|
|Summary||0005974: TJvDockServer and dockable controls|
Good day! I use to program in Delphi (BDS 2006) library JVCL, and modules docking. Here I have one problem - namely, if the control has properties DragKind = dkDock and DragMode = dmAutomatic, then inexplicably TJvDockServer component takes the controls are both clients and provides docking. This procedure is wrong, because, as I found out, JVCL-docking functions normally only control class TForm, which contain a component class TJvDockClient. I would like to know whether it is possible in some way to prevent TJvDockServer do docking controls whose class is different from TForm? During a typical docking in Delphi for each event is called OnGetSiteInfo dock and it is possible to filter clients, but there is no such event TJvDockServer. I would be very grateful for your help.
Project file with all modules JVCL attached as an archive zip.
2 Lord Arioch :)
You're right, I do not know English. Ok, I'll try to explain again. Located on the main form control class TFrame:
TForm1 = class (TForm)
It has the following properties:
Frame32.DragKind: = dkDock; Frame32.DragMode: = dmAutomatic;
That is, this frame is dockable. Next, in the form of a component class TJvDockServer. If I do a drag-and-dock for my frames, TJvDockServer accepts it as a customer - on the side of the form, which fits the frame, draw a narrow shaded strip and then the frame is docked. But it generates an error - this box can not be extracted from the dock. All works correctly only with the forms of class TForm or their descendants - when the form appears on one of the panels TJvDockServer, blue rectangle is drawn (as in design-redkatore Delphi) and the form will be properly docked, then it can be floated and make docking in another part of the main form. I would like to prevent that frames and any other dockable control, which is not a class TForm, were docked in TJvDockServer.
HowToUse.zip [^] (3,311,735 bytes) 2012-08-31 11:05
JVCL-0005974_bug_demo.rar [^] (373,348 bytes) 2012-08-31 15:37
I downloaded your archive.
1st of all, i think that you'd remove *.dcu when uploading - those are nothing but wasted internet traffic and server disk.
2nd i cannot understand why you copied next to whole JCL and JVCL libraries into the project. Did you installed Jcl and JVCL into Delphi ? It looks rather weird to have JCL/JVCL copy in project folder. If nothing else, it would give you hard time when updating JCL and JVCL - you would have to update it in all your projects.
I removed those files and made archive smaller.
the framework is awfully complex yet i think that
TJvDockCustomControl should override TWinControl.GetSiteInfo
This should check if there is DockManager.
If there is - then it should check if it is JvDockManager
If it is not - then it should set CanDock to false;
Otherwise he should either delegate decision to inherited TWinControl.GetSiteInfo, or to JvDockManager.DoCustomGetSeiteIngo
I'll explain why all modules are assembled in a project folder. The fact is that our license does not allow Delphi to install foreign components, even if they are free. So I need to work in all modules that are responsible for docking.
Your idea to override TWinControl.GetSiteInfo is clear, but I believe that this should be done not for JvDockManager, and for TJvDockPanel. Unfortunately, in my project module I could not do it. Positive results were obtained, when I was a little corrected module JvDockControlForm.pas, where there is a designer of this panel, but this method I do not like. Could you explain how this can be done in a module project?
edited on: 2012-09-03 10:45
> does not allow Delphi to install foreign components
But if you're using them without installing, then still why not put that in separate folder and add it to Project Options to search path ?
> not for JvDockManager, and for TJvDockPanel.
i named neither of those.
>> TJvDockCustomControl should override TWinControl.GetSiteInfo
and to follow:
> delegate decision to inherited TWinControl.GetSiteInfo,
That is probably bad idea
> or to JvDockManager.DoCustomGetSeiteIngo
That is probably a better one.
Those choices all however is related to design goals of the framework - and who can know them now ?..
edited on: 2012-09-03 11:42
I quite dislike
function TJvDockCustomControl.GetJvDockManager: IJvDockManager;
Result := IJvDockManager(DockManager);
Frankly, i am afraid of it...
Changed it in proposal for 0005271
edited on: 2012-09-03 11:44
Well, the problem is i cannot reproduce your behaviour.
When i compile your project
1) frames do not have background colour until detached form main window
(Easily fixed by Parent Background - yet why? assuming you compiled form that very sources, that should not be. Or your EXE is from different sources)
2) frames are easily docked and undocked to me (probably because you create DockClient when docking)
This is not a bug in JVDocking. This is you not understanding VCL! :-)
Anyways, I figured out a solution for you, see this answer.
|Ok, then this issue can be resolved|
|2012-08-31 11:05||Melenkurion||New Issue|
|2012-08-31 11:05||Melenkurion||File Added: HowToUse.zip|
|2012-08-31 11:28||Melenkurion||Tag Attached: D2006|
|2012-08-31 11:28||Melenkurion||Tag Detached: D2006|
|2012-08-31 11:29||Melenkurion||Tag Attached: Delphi 2006|
|2012-08-31 15:28||Arioch||Relationship added||child of 0005271|
|2012-08-31 15:37||Arioch||Note Added: 0020141|
|2012-08-31 15:37||Arioch||File Added: JVCL-0005974_bug_demo.rar|
|2012-08-31 18:32||Arioch||Note Added: 0020146|
|2012-09-03 10:39||Melenkurion||Note Added: 0020151|
|2012-09-03 10:43||Arioch||Note Added: 0020152|
|2012-09-03 10:45||Arioch||Note Edited: 0020152|
|2012-09-03 11:03||Arioch||Note Added: 0020153|
|2012-09-03 11:23||Arioch||Note Added: 0020154|
|2012-09-03 11:42||Arioch||Note Edited: 0020153|
|2012-09-03 11:44||Arioch||Note Edited: 0020154|
|2012-09-13 03:03||wpostma416||Note Added: 0020184|
|2013-01-15 15:30||obones||Note Added: 0020358|
|2013-01-15 15:30||obones||Status||new => resolved|
|2013-01-15 15:30||obones||Resolution||open => no change required|
|2013-01-15 15:30||obones||Assigned To||=> obones|
|Mantis 1.1.6[^] Copyright © 2000 - 2008 Mantis Group|