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 » How and where to set position when using layouts?
icon5.gif  How and where to set position when using layouts? [message #45240] Thu, 15 October 2015 22:08 Go to next message
frozen is currently offline  frozen
Messages: 13
Registered: January 2013
Promising Member
Hi!

I am a bit confused.

I have used layouts for everything.
There is the main window with a splitter inserted via layout.
And then there are two other layouts, containing some widgets.

Inside the constructor of the app I have:
MainSplitter.Horz ( tabbasic.SizePos(), ErgebnisGrid.SizePos() );
MainSplitter.SetPos ( MainSplitter.ClientToPos ( tabbasic.GetLayoutSize() ), 0 );


I hoped this would place the splitter control in a way that the small tabbasic is completely visible without giving it more place than needed and leaving the rest for ErgebnisGrid.

But this doesn't work.

I finally came up with some sort of solution by setting the position like this:
void MyApp::Layout()
{
	MainSplitter.SetPos ( MainSplitter.ClientToPos ( tabbasic.GetLayoutSize() ), 0 );
}


This works fine. But if you minimize the app and then maximize it again, it's all painted black. Trying TopWindow::Layout(); or anything else doesn't help..

Any ideas? Is there something rather obvious that I am missing?

Thank you very much!

Kind regards,

frozen
Re: How and where to set position when using layouts? [message #45244 is a reply to message #45240] Fri, 16 October 2015 14:09 Go to previous message
frozen is currently offline  frozen
Messages: 13
Registered: January 2013
Promising Member
I created a testcase.

If you compile and run it as it is now it shows the desired layout but turns black on minimize followed by maximize.
If you comment out line 11 in SplitterTest.h (#define overwritelayout) you will see the layout I do not want - but minimizing and maximizing work fine..

System is Win7.

I hope this makes it easier to understand, what I mean.

Thanks!
Previous Topic: MayBe extend Styles of Splitter?
Goto Forum:
  


Current Time: Fri Aug 18 18:27:24 CEST 2017

Total time taken to generate the page: 0.01746 seconds