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 » ArrayCtrl, HeaderCtrl & GridCtrl » It's a little strange for zooming GridCtrl column layout width
It's a little strange for zooming GridCtrl column layout width [message #29014] Sat, 02 October 2010 04:09 Go to next message
sevenjay is currently offline  sevenjay
Messages: 30
Registered: October 2008
Location: Taiwan
Member
I found it's alway VertLayoutZoom even setting Width.
so I just fix it by this:
GridCtrl::ItemRect& GridCtrl::ItemRect::SizeH(int n)
{
    hidden = n == 0;
    
    n = Ctrl::VertLayoutZoom(n);

    if(!hidden)
    {
        if(n < min) { n = min; ismin = true; }
        if(n > max) { n = max; ismax = true; }
    }
    else
        n = 0;

    size = nsize = n;
    return *this;
}
GridCtrl::ItemRect& GridCtrl::ItemRect::SizeW(int n)
{
    hidden = n == 0;
    
    n = Ctrl::HorzLayoutZoom(n); //modified

    if(!hidden)
    {
        if(n < min) { n = min; ismin = true; }
        if(n > max) { n = max; ismax = true; }
    }
    else
        n = 0;

    size = nsize = n;
    return *this;
}

GridCtrl::ItemRect& GridCtrl::ItemRect::Width(int n)
{
    return SizeW(n); //modified
}

GridCtrl::ItemRect& GridCtrl::ItemRect::Height(int n)
{
    return SizeH(n); //modified
}

Maybe my code can be more clear.

[Updated on: Sat, 02 October 2010 04:10]

Report message to a moderator

Re: It's a little strange for zooming GridCtrl column layout width [message #29026 is a reply to message #29014] Sat, 02 October 2010 17:11 Go to previous message
unodgs is currently offline  unodgs
Messages: 1366
Registered: November 2005
Location: Poland
Ultimate Contributor

Thanks! In a little bit different form in svn.
Previous Topic: GridCtrl Serialize problem and solution
Next Topic: VirtualArrayCtrl embedded Ctrls
Goto Forum:
  


Current Time: Fri Apr 19 20:55:02 CEST 2024

Total time taken to generate the page: 0.02760 seconds