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 » splitter bounds
splitter bounds [message #8055] Mon, 05 February 2007 22:44 Go to previous message
exolon is currently offline  exolon
Messages: 62
Registered: July 2006
Location: 53'21N 6'18W
Member
Is there an easy way to set the limits of a splitter's position?
i.e. I want the minimum to be 50% and maximum to be 70%.

Currently I've got it working by hand like so (in my TopWindow subclass):
	virtual void Paint(Draw& w) {
		int splitterPos = verticalSplitter.GetPos();
		if(splitterPos < 5000)
			verticalSplitter.SetPos(5000);
		else if(splitterPos > 7000)
			verticalSplitter.SetPos(7000);
		TopWindow::Paint(w);
	}


This flickers while trying to drag the splitter out of bounds though. A Splitter::SetBounds(int min, int max) or something method might be nice, but I'm not sure how to go about this most efficiently.

I might be getting it completely wrong, since I'm still very inexperienced in UPP and GUI programming in general.

Oisín
 
Read Message
Read Message
Previous Topic: new behaviour of Splitter 608-dev2
Next Topic: Issue with SplitterFrame
Goto Forum:
  


Current Time: Sat Jun 19 01:13:52 CEST 2021

Total time taken to generate the page: 0.01856 seconds