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 #19526 is a reply to message #19525] Thu, 11 December 2008 15:03 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 14257
Registered: November 2005
Ultimate Member
mrjt wrote on Thu, 11 December 2008 04:38


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.



Debatable.

I think when puttin DropList to ToolBar, you need to set the width anyway. That is why there is

void Add(Ctrl& ctrl, int cx, int cy = 0);

variant. cy is minsize, you just need to put cx.

BTW, the REAL problem there is that I am undecided whether cx, cy should be altered by font zoom...

Mirek
 
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: Sun May 11 12:23:41 CEST 2025

Total time taken to generate the page: 0.02098 seconds