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 » U++ Widgets - General questions or Mixed problems » Size of TopWindow is different then the size I set for it
Re: Size of TopWindow is different then the size I set for it [message #48869 is a reply to message #48868] Mon, 16 October 2017 12:08 Go to previous message
rafiwui is currently offline  rafiwui
Messages: 105
Registered: June 2017
Location: Stuttgart, Germany
Experienced Member
It seems to work a bit. When I place CtrlLayout at the end it seems that there is a slightly bigger view area. But I faced another problem because I call it like this:
TestWindow::TestWindow()
{
	//CtrlLayout(*this);
	Sizeable(true);
	Title("Testing");
	SetRect(0, 0, Zx(400), Zy(200));
	
	// Create menu bar
	AddFrame(m_menuBar);
	m_menuBar.Set(THISBACK(OnMenuBar));
	
	CtrlLayout(*this);
}

Doing it with this code still leads to a bit of a cut at the bottom of the view area. Even though the layout has the exact same size as the SetRect method is given.

TestWindow::TestWindow()
{
	//CtrlLayout(*this);
	Sizeable(true);
	Title("Testing");
	//SetRect(0, 0, Zx(400), Zy(200));
	
	// Create menu bar
	AddFrame(m_menuBar);
	m_menuBar.Set(THISBACK(OnMenuBar));
	
	CtrlLayout(*this);
}

Commenting out SetRect leads to not displaying anything but the empty view area. This is kind of strange so I would appreciate if you have any idea.

I also added the whole package as an attachment if you need further information of my code.

EDIT: Oh never mind I just remembered that I faced this problem before. It is caused by the AutoResizer because if you don't set a size at the beginning explicitly it has no original size to work with because TopWindow is instantiated with a size of 0 or similiar. Guess I have to rethink some stuff.
  • Attachment: Testing.7z
    (Size: 2.11KB, Downloaded 177 times)


Greetings
Daniel

[Updated on: Mon, 16 October 2017 12:10]

Report message to a moderator

 
Read Message
Read Message
Read Message
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 to blur a Ctrl
Next Topic: preferred way to get event "sender" control?
Goto Forum:
  


Current Time: Mon May 13 05:45:49 CEST 2024

Total time taken to generate the page: 0.01646 seconds