|  | 
| Scroll bars and CXTPControlGalleryItem | 
| Post Reply   | 
| Author | |
| terrym   Senior Member   Joined: 13 April 2007 Status: Offline Points: 836 |  Post Options  Thanks(0)  Quote  Reply  Topic: Scroll bars and CXTPControlGalleryItem Posted: 19 May 2008 at 6:05am | 
| We have an override for CXTPControlGalleryItem and in the Draw handler we want to check if the scroll bar is shown or hidden. How do you do this please??? Thanks Terry | |
| 
     Thank you, Terry Mancey email terry@tmancey.ltd.uk | linkedin www.tmancey.ltd.uk | twitter @tmancey | |
|  | |
| Oleg   Senior Member   Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |  Post Options  Thanks(0)  Quote  Reply  Posted: 20 May 2008 at 12:46am | 
| m_bShowScrollBar ? :) | |
| 
     Oleg, Support Team CODEJOCK SOFTWARE SOLUTIONS | |
|  | |
| terrym   Senior Member   Joined: 13 April 2007 Status: Offline Points: 836 |  Post Options  Thanks(0)  Quote  Reply  Posted: 20 May 2008 at 11:17am | 
| 
 Yes but m_bShowScrollBar is a private member and there is no function for this :(, we are doing pGallery->m_bShowScrollBar Is there a public function??? or do I need to move and this will be fixed for 12.0.1 | |
| 
     Thank you, Terry Mancey email terry@tmancey.ltd.uk | linkedin www.tmancey.ltd.uk | twitter @tmancey | |
|  | |
| terrym   Senior Member   Joined: 13 April 2007 Status: Offline Points: 836 |  Post Options  Thanks(0)  Quote  Reply  Posted: 20 May 2008 at 11:36am | 
| 
   Actually I assume:
 CRect rc = pGallery->GetBorders(); would give us the Rect we require eg. rc.Width() is width of scrollbar ??? Found this after reading source code to XTP | |
| 
     Thank you, Terry Mancey email terry@tmancey.ltd.uk | linkedin www.tmancey.ltd.uk | twitter @tmancey | |
|  | |
| Oleg   Senior Member   Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |  Post Options  Thanks(0)  Quote  Reply  Posted: 20 May 2008 at 1:21pm | 
| 
   Hi,
 use rc parameter passed in Draw method - it always have right rectangle to draw - already border/scrollbar adjusted. | |
| 
     Oleg, Support Team CODEJOCK SOFTWARE SOLUTIONS | |
|  | |
| terrym   Senior Member   Joined: 13 April 2007 Status: Offline Points: 836 |  Post Options  Thanks(0)  Quote  Reply  Posted: 20 May 2008 at 5:44pm | 
| 
 This is not the case for our owner draw as it seems rc.Width() includes the scrollbar aswell | |
| 
     Thank you, Terry Mancey email terry@tmancey.ltd.uk | linkedin www.tmancey.ltd.uk | twitter @tmancey | |
|  | |
| Post Reply   | |
| Tweet | 
| Forum Jump | Forum Permissions  You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |