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 » Splitter::SetMinPixels() bug+fix
Splitter::SetMinPixels() bug+fix [message #24038] Mon, 21 December 2009 13:11 Go to next message
Tom1
Messages: 1251
Registered: March 2007
Senior Contributor
Hi,

Splitter::SetMinPixels() fails set the minimum control size correctly in pixels when the splitter is configured to work in vertical mode. The fixed Splitter::GetMins() correcting the problem is here:
int Splitter::GetMins(int i) const
{
   int min1 = (i < mins.GetCount() ? mins[i] : 0);
   int min2 = 0;
   int cx = IsVert()?GetSize().cy:GetSize().cx;
   if(cx)
       min2 = (i < minpx.GetCount() ? minpx[i] : 0) * 10000 / cx;
   return max(min1, min2);
}


Best regards,

Tom
Re: Splitter::SetMinPixels() bug+fix [message #24070 is a reply to message #24038] Thu, 24 December 2009 10:59 Go to previous message
mirek is currently offline  mirek
Messages: 14105
Registered: November 2005
Ultimate Member
[quote title=Tom1 wrote on Mon, 21 December 2009 07:11]Hi,

Splitter::SetMinPixels() fails set the minimum control size correctly in pixels when the splitter is configured to work in vertical mode. The fixed Splitter::GetMins() correcting the problem is here:
int Splitter::GetMins(int i) const
{
   int min1 = (i < mins.GetCount() ? mins[i] : 0);
   int min2 = 0;
   int cx = IsVert()?GetSize().cy:GetSize().cx;
   if(cx)
       min2 = (i < minpx.GetCount() ? minpx[i] : 0) * 10000 / cx;
   return max(min1, min2);
}


Stupid me, thanks a lot!

Mirek
Previous Topic: Patch request for SplitterFrame
Next Topic: Splitter::Reset and Splitter::Clear clarification
Goto Forum:
  


Current Time: Fri Nov 01 00:19:05 CET 2024

Total time taken to generate the page: 0.02230 seconds