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 » add controls to splitter bar, how? [NEEDS MORE IMPLEMENTATION...]
Re: add controls to splitter bar, how? [message #1878 is a reply to message #1877] Fri, 24 March 2006 17:58 Go to previous messageGo to previous message
fudadmin is currently offline  fudadmin
Messages: 1321
Registered: November 2005
Location: Kaunas, Lithuania
Ultimate Contributor
Administrator
ok, in fact, semi-working example is this:
#include <CtrlLib/CtrlLib.h>

class App : public TopWindow {
	LineEdit ed1,ed2;
	Splitter horz;
	Option btn;
public:
	typedef App CLASSNAME;
	void Move();
	App();
};

void App::Move(){
	if (btn.Get())
		  horz.SetPos(1000);
	else  horz.SetPos(5000);
	btn.SetRectX(horz.GetPos()/13-10,10);
}

App::App(){
	horz.Add(ed1);
	horz.Add(ed2);
	Add(horz.Horz().VSizePos(35,35));

	btn.SetRectY(50,50);
	btn.SetRectX(horz.GetPos()/13-10,10);
	Add(btn);

	btn.WhenAction=THISBACK(Move);

	Sizeable().Zoomable();
}

GUI_APP_MAIN
{	
	App().Run();
}


First problem is that position returned from splitter is in different units than from other controls...
Second problem is that in this case I need to catch splitter bar events and update button position...

What I wanted was the same like for HeaderCtrl - public access Splitter Bar...
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: how programatically change widths/heights of splitted controls? [SOLVED]
Next Topic: setters of Splitter should return Splitter& [ADDED]
Goto Forum:
  


Current Time: Fri Apr 19 14:14:12 CEST 2024

Total time taken to generate the page: 0.04147 seconds