Page 1 of 1
JadeDockContainer...Your thoughts?
Posted: Fri Aug 07, 2009 1:04 pm
by ConvertFromOldNGs
by cnwtb2 >> Wed, 15 Nov 2006 19:48:55 GMT
Hello All,
I have created a PARSYS entry regarding the following, I would like to know what people think on the matter and any experiences they have.
The current mechanism for JadeDockContainer's when adding to a form and aligning them to the parent is to fully lock the entire space in which they have been aligned. If another JadeDockContainer is added to the form the same approach applies with the order of precedence being: Top and Bottom, then left and Right. Hence, if I were to add a JadeDockContainer to a form and align it to the left it would take the entire left side of the form. If I were then to add another JadeDockContainer and align it to the Top (or Bottom) then this takes precedence over the Left (or Right) aligned JadeDockContainer and fills the entire Top (or Bottom) of the form which forces the left aligned JadeDockContainer to resize down to accommodate the newly Top aligned JadeDockContainer.
Would it not be more beneficial to have the order of precedence sorted by when the control was added?
If I added a Left aligned JadeDockContainer and then added a Bottom aligned JadeDockContainer, I would expect the Left aligned JadeDockContainer to have precedence over the Bottom because it was added first and therefore the Bottom aligned JadeDockContainer would align to the Bottom but would only take up the space that was free due to the Left aligned JadeDockContainer already having some of the existing bottom space. This approach to JadeDockContainers would also keep the current implemented mechanism without any sacrifice for space and therefore not affect any current methodologies that people have in place for using JadeDockContainer's.
I see no detrimental effects that this new approach would have on a Jade orientated system, in fact, I believe that the JadeDockContainer and JadeDockBar would be more happily used if the user themselves had more control over how they were to be placed.
Your thoughts?
Re: JadeDockContainer...Your thoughts?
Posted: Fri Aug 07, 2009 1:04 pm
by ConvertFromOldNGs
by Michael J. >> Wed, 15 Nov 2006 21:06:02 GMT
Wouldnt it be more straight forward if it was based on the zorder of the interacting controls? Basing it on add order seems very cumbersome, in effect it would force the user to delete and re-add controls if the precedence needed to be changed.
Re: JadeDockContainer...Your thoughts?
Posted: Fri Aug 07, 2009 1:04 pm
by ConvertFromOldNGs
by cnwtb2 >> Thu, 16 Nov 2006 1:47:06 GMT
Yes, I agree, but a user currently has to pre-thought how he/she wishes a form is to look anyway (in theory and in good practice), therefore, there is no overhead in regards to deleting and re-adding controls when this is currently the nature of the beast.
I can see that adding 10 JadeDockContainers to a form and realising that the second JDC was in the wrong place is going to cause some small amount of grief but at what level of thought do you go to before common sense kicks in...(has anybody actually used more than 4-5 JDC on a single form in the same parent anyway ?)
Re: JadeDockContainer...Your thoughts?
Posted: Fri Aug 07, 2009 1:04 pm
by ConvertFromOldNGs
by BeeJay >> Thu, 16 Nov 2006 0:09:46 GMT
You can achieve the desired look already in the current Jade version with a little bit of lateral thinking. Put a frame control on the bottom of the form, with parentAspect set to Anchor Bottom & Stretch Right. Put your DockContainer control that you want at the bottom of the form into the frame, instead of directly on the form.
Now your left side DockContainer will take up the full vertical height and your bottom DockContainer will take up what is left.
Cheers,
BeeJay.
Re: JadeDockContainer...Your thoughts?
Posted: Fri Aug 07, 2009 1:04 pm
by ConvertFromOldNGs
by cnwtb2 >> Thu, 16 Nov 2006 2:16:53 GMT
This is currently the mechanism in place to achieve the 'look-and-feel' of what we want BUT we dont have the mechanism and Internal functions of the JadeDockContainer.
For Example:
We have a JDC aligned left. We load an app that runs maximized MDIForms. The value of the JDC here is that if we resize the JDC from left to right or from right to left, the child MDIForm auto-sizes proportionally with the JDC resize. This doesn't work for the frame control as the maximized MDIForm causes the frame to resize under the Maximized MDIForm and has no effect on the sizing of this MDIForm.
Re: JadeDockContainer...Your thoughts?
Posted: Fri Aug 07, 2009 1:04 pm
by ConvertFromOldNGs
by BeeJay >> Mon, 20 Nov 2006 21:53:59 GMT
Sorry, I was thinking of a fixed width left side dock container, in which case this technique works quite well. If you have a left side dock bar that can change in width, then you will unfortunately need to put code in to adjust the left and width of the frame at the time when you action the code that will result in the width of the container changing.
Similarly, if the bottom frame can change height, you'll also need to make use of a call to Form::moveMdiClient to allow for the reduction or increase in the actual MDI Client area.
Alternately, you could simply live with the current behaviour of the bottom dock container taking precedence over the left one and use that area for a logo display or something and not have to write any resize related code. This is the approach I've taken in the past and once you get over the reluctance to go this route and defer from your chosen UI look, the fact that you don't need any resize code at all is great... {;-รพ)
Cheers,
BeeJay.
Re: JadeDockContainer...Your thoughts?
Posted: Fri Aug 07, 2009 1:04 pm
by ConvertFromOldNGs
by Alan >> Thu, 16 Nov 2006 7:20:47 GMT
My use of JadeDockContainer has been limited, my initial reaction would be to be to base it upon tab sequence - I imagine it would be a pain to have to
reload all current containers in the correct sequence to alter one container.
Maybe have a couple new attributes for (say) Top and Bottom aligned container indicating if it "submits" to a left or right container e.g. submitToLeft / submitToRight
Re: JadeDockContainer...Your thoughts?
Posted: Fri Aug 07, 2009 1:04 pm
by ConvertFromOldNGs
by Torrie >> Mon, 20 Nov 2006 0:16:45 GMT
I think you can acheive this by using the existing functionality simply by adding multiple containers. For example if you wanted to have a panel on the left, then say three horizontal panels on the right eg (might need fixed width fonts to see the picture)
_______________________________
| | |
| | |
| | |
| |__________________|
| | |
| | |
| | |
| |__________________|
| | |
|__________|__________________|
you would add the following
1) A container (dc1) that takes up the entire space.
2) A dock bar that is aligned left to its container (panel on the left) 3) A dock container (dc2) that is aligned all vertical to its container (dc1) (takes up the space to the right of the dock bar above.
4) Add a dock bar that is aligned Bottom to the doc container (dc2)
5) add two additional dock bars to the dock container (dc2) and align all Horizontal (or make one top if needed)
With in each dock container the dock bars are only aligned in one direction (eg top, bottom and all Horisontal OR left, right and all vertical.) Thus you can build up the required precedence order in resizing. Set the borders, grip bars and resize bars as required.
Torrie
Re: JadeDockContainer...Your thoughts?
Posted: Fri Aug 07, 2009 1:04 pm
by ConvertFromOldNGs
by BeeJay >> Mon, 20 Nov 2006 21:17:26 GMT
Torrie,
While this technique works well where you want to create a single form with multiple panels, in fact I have used a similar approach myself, it possibly won't help with Tom's issue where he wants to have left and bottom toolbars on his MDI frame and then the remaining space automatically filled by his maximized MDI child forms.
ie: Simulating SDI with maximized MDI child forms.
This approach of simulated SDI using borderless maximized MDI child forms works really well in Jade 6.1 where you can now suppress both the MDI Child's control box at the left end of the menu bar area and the MDI Child's Minimize/Maximize-Restore/Close widgets at the right end of the menu bar area.
Cheers,
BeeJay.