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 » Menus&Toolbars » DropList in Toolbar
Re: DropList in Toolbar [message #19525 is a reply to message #19522] Thu, 11 December 2008 10:38 Go to previous messageGo to previous message
mrjt is currently offline  mrjt
Messages: 705
Registered: March 2007
Location: London
Contributor
Well, this is partly your mistake and partly a Upp bug.

Your mistake:
When you add Ctrls to a ToolBar it manages the layout internally and you just tell it a size. Instead of:
bar.Add(dl.HSizePos().TopPos(5, Ctrl::STDSIZE));
You use:
bar.Add(dl, dl.StdSize());
And you can change the StdSize() to Size(100, 20) or whatever.

The Upp bug:
The StdSize() shouldn't be necessary, as the default size used should be at least more-or-less correct. The problem is that the default Add function in CtrlLib/Bar.h:
	void   Add(Ctrl& ctrl)                          { AddCtrl(&ctrl, ctrl.GetMinSize()); }
Should be using StdSize():
	void   Add(Ctrl& ctrl)                          { AddCtrl(&ctrl, ctrl.GetStdSize()); }
In most cases this makes no difference, but for DropList it does.

Additionally DropList::GetMinSize() is clearly too small.
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: images as menu
Next Topic: right-click menu
Goto Forum:
  


Current Time: Sat May 18 21:29:31 CEST 2024

Total time taken to generate the page: 0.01092 seconds