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 » TreeCtrl » Changing tree control style
Re: Changing tree control style [message #30534 is a reply to message #29767] Fri, 07 January 2011 08:01 Go to previous messageGo to previous message
gprentice is currently offline  gprentice
Messages: 260
Registered: November 2005
Location: New Zealand
Experienced Member
To get the dotted line that I want I've had to do a series of DrawRect to draw a one pixel by one pixel rect i.e. a single pixel. The "dotted" line style supported by Windows and U++ is 3 pixels solid, 3 pixels clear which is not what I want. Is there any more efficient way to draw one pixel that calling DrawRect?

From TreeCtrl::Paint
         if(yh >= 0 && yl < sz.cy) {
            int x = levelcx + levelcx * l.level + levelcx2 - org.x;
            //w.DrawRect(x, yl, 1, yh - yl, SColorShadow);
            for (int k = 0; k < (yh - yl); k += 2)
               w.DrawRect(x, yl + k, 1, 1, SColorShadow);

//...

      if(w.IsPainting(0, y, sz.cx, msz.cy) && msz.cy > 0) {
         //w.DrawRect(op.x, op.y, levelcx2, 1, SColorShadow);
         for (int k = 2; k < levelcx2; k += 2)
            w.DrawRect(op.x + k, op.y, 1, 1, SColorShadow);




 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Anomaly in tree control
Next Topic: PROPOSAL: TreeCtrl optionally owns Ctrl's in Node
Goto Forum:
  


Current Time: Tue May 07 17:16:04 CEST 2024

Total time taken to generate the page: 0.02784 seconds