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 » MinSize and ParentCtrl
MinSize and ParentCtrl [message #14106] Mon, 11 February 2008 12:11 Go to previous message
mrjt is currently offline  mrjt
Messages: 705
Registered: March 2007
Location: London
Contributor
I know I've mentioned this before, but this is still really bugging me. I honestly believe that it would be a substantial improvement if ParentCtrl had SetMinSize functionality as in TopWindow:
struct ParentCtrl : public Ctrl {
	virtual Rect   GetVoidRect();
	virtual Size   GetStdSize() const;

	virtual void SetMinSize(Size sz)	{ minsize = sz; }
	virtual Size GetMinSize() const		{ return IsNull(minsize) ? Ctrl::GetMinSize() : minsize; }

	ParentCtrl();
private:
	Size minsize;
};

(StaticCtrl.h)
Rect ParentCtrl::GetVoidRect()
{
	return GetSize();
}

Size ParentCtrl::GetStdSize() const
{
	return GetMinSize();
}

ParentCtrl::ParentCtrl()
{
	NoWantFocus();
	Transparent();
	minsize = Null;
}
(Static.cpp)
If not a modified ParentCtrl, can we at least have a different Ctrl with this functionality in CtrlLib please (MinSizeCtrl or LayoutCtrl)? I'm getting tired of adding it myself Smile
 
Read Message
Read Message
Read Message
Previous Topic: Scrolling in tabs
Next Topic: Printing using RichEditWithToolBar and PrinterJob on the same sheep of paper?
Goto Forum:
  


Current Time: Tue May 14 01:47:40 CEST 2024

Total time taken to generate the page: 0.02381 seconds