Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Developing U++ » UppHub » Docking: How to dock to the entire portion of what remains?
Docking: How to dock to the entire portion of what remains? [message #26504] Thu, 06 May 2010 21:17 Go to next message
ktj9 is currently offline  ktj9
Messages: 17
Registered: April 2010
Promising Member
Hello,
Docking has Left,Top,Right,Bottom. So I can always see blank portion that is not occupied, unless I drag a dockable. I am wondering how to specify so the last Dockable that I add will take all the space that remains. I guess I need to use Dock(int alingn,DockableCtrl& dc). But I don't quite understand the meaning and purpose of arguments; and cannot get what I want after playing some experiments.
Thanks!
Re: Docking: How to dock to the entire portion of what remains? [message #26628 is a reply to message #26504] Mon, 17 May 2010 14:04 Go to previous messageGo to next message
mrjt is currently offline  mrjt
Messages: 705
Registered: March 2007
Location: London
Contributor
Hi,

Do you mean that you want the client area of the DockWindow (the grey bit in the middle) to be completely filled by the docked ctrls?

Just to be clear, the client area is the space where the code would be in Visual Studio.

If so then it's not really possible. You could maybe use DockWindow::SetFrameSize:
SetFrameSize(DockWindow::DOCK_LEFT, sz.cx);

(where sz is the size of the window from GetRect)

But there are potential problems that make a general solution quite difficult. Somebody else is asking for the ability to dock a window to the client area which I think would solve your problem, so I'll think about it and see what I can come up with.
Re: Docking: How to dock to the entire portion of what remains? [message #26774 is a reply to message #26628] Wed, 26 May 2010 19:40 Go to previous messageGo to next message
ktj9 is currently offline  ktj9
Messages: 17
Registered: April 2010
Promising Member
Thanks you for your respond. Actually after playing Docking for a while, it is the approach of defining LEFT,RIGHT,TOP,BOTTOM that confuses me. As you have mentioned Visual Studio, I think VS' approach is more intuitive, or maybe it is just because I have got too much used to it. The definition in VS that I can see is to define docking, splitting vertically, and splitting horizontally. By defining L,R,T,B, there is always some moment confusing, e.g. " if I put it to the right, how the class will handling its top regarding existing widget ", which leaves me to look into codes. And if the behavior is not what I expect, I probably can nothing about it.
Thanks!
Re: Docking: How to dock to the entire portion of what remains? [message #26814 is a reply to message #26774] Mon, 31 May 2010 01:46 Go to previous messageGo to next message
mrjt is currently offline  mrjt
Messages: 705
Registered: March 2007
Location: London
Contributor
Well, the idea with docking is that you shouldn't have to be worrying about such things, it is up to the user. That is kind of the whole point. If you don't want this flexibility there are simpler ways of doing things without Docking.

And with serialization you don't even have to make the initial/default layout with code, you can set it up in the app and save it.

However, if you care about such things it is supportted. The sizing of widgets is determined by their size hints (min, std, max) and the order in which they are docked can be controlled in two ways:
1- Add the widgets in order (left to right, top to bottom)
2- Use the Dock function that has the position/pos parameter (I don't have code access right now, but it's something like DockWindow::Dock(int align, int pos). Then you can dock them in any order you like.

Other things are taking up my time at the moment so big changes are unlikely but I'm open to suggestions for improvements. Incidentally I added comments to DockWindow.h in my last update to make things a bit clearer (I hope Smile) so you may want to update from the SVN if you haven't already.

James
Re: Docking: How to dock to the entire portion of what remains? [message #28574 is a reply to message #26814] Tue, 07 September 2010 17:41 Go to previous message
281264 is currently offline  281264
Messages: 270
Registered: June 2010
Location: Spain
Experienced Member
Certainly, the possibility of docking controls within the client area of the DockWindow (the grey bit in the middle) is a good option and it will improve application’s usability.

Cheers,

Javier
Previous Topic: Docking - Stable?
Next Topic: Scatter: Propose to add new methods
Goto Forum:
  


Current Time: Fri Apr 19 22:16:05 CEST 2024

Total time taken to generate the page: 0.06419 seconds