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 » U++ Library support » Splitter » multiple controls on a splitter side
Re: multiple controls on a splitter side [message #38209 is a reply to message #38208] Thu, 06 December 2012 12:12 Go to previous messageGo to previous message
dolik.rce is currently offline  dolik.rce
Messages: 1789
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

crydev wrote on Thu, 06 December 2012 11:33

I have a splitter which contains an arrayctrl on the left side. Now I would like to place a custom ctrl with a fixed height(not resizable) above the arrayctrl. Say the custom ctrl has a height of 100, and the arrayctrl takes the rest. When I resize the window, the arrayctrl should be resized, and the custom ctrl should remain its height. In .NET this is the standard control docking. However, I looked over the U++ docking component, but this clearly is not what I am looking for. I also took a look at SetMin function of Splitter, but there is no SetMax equivalent that could suit my needs.

How chould I solve this?

Hi crydev,

You can use ParentCtrl to achieve both having multiple Ctrls in one splitter cell and having them independently sized. Here is a simple example:
#include <CtrlLib/CtrlLib.h>

using namespace Upp;

struct App : TopWindow {
	Splitter s;
	Button b;
	LineEdit e;
	ParentCtrl p;
	
	App() {
		b.SetLabel("some button");
		p.Add(b.HSizePos().TopPosZ(0,30));
		s.Vert(p, e);
		Add(s.SizePos());
	}
};

GUI_APP_MAIN {
	App().Run();	
}


Best regards,
Honza
 
Read Message
Read Message
Read Message
Previous Topic: Added One more example of reference/SplitterFrame
Next Topic: Uninitialised value in SplitterFrame
Goto Forum:
  


Current Time: Thu May 09 10:13:53 CEST 2024

Total time taken to generate the page: 0.01850 seconds