all groups > dotnet windows forms designtime > january 2005 >
You're in the

dotnet windows forms designtime

group:

Scrollable groupbox?


Scrollable groupbox? WWalden
1/19/2005 8:09:02 AM
dotnet windows forms designtime: I am trying to create a GroupBox control with support for scrolling the inner
content and nicer looking borders. How do I go about positioning the
scrollbars so that they are inside of my drawn borders?

I am attempting to add a child Panel control at design time (from code is a
custom designer class) that will be the drop-point for child controls. I am
running into serialization issues now since the inner Panel is only created
at design-time. It's not getting set into the parent control properly, and I
don't know how to fix it.

Another thing I have tried is to use the Win32 API to manage the scrollable
portion (SetScrollInfo, ScrollWindowEx, etc..), but the painting of the
border gets messed up by the clipping rectangle of the scrolling region. If
anyone has any tips for implementing this, it might help as well.

Re: Scrollable groupbox? WWalden
1/20/2005 4:49:08 AM
Thanks for the reply. My reasoning is simply that I am trying to create a
high quality control. My borders can use several styles, thicknesses, etc.
Processing WM_NCPAINT draws the border, but the scrollbars and controls get
painted over it.

I know I could tell end developers to add a scrollable panel and set the
DockStyle to Fill, but I want to be able to offer a scrolling container out
of the box. I also wanted to implement more complex scrolling options.

[quoted text, click to view]
Re: Scrollable groupbox? joeycalisay
1/20/2005 2:20:18 PM
Any reasons why you need such control if Panel is already a
ScrollableContainer? Besides, if you only want to modify the borders, you
can customize your border with the .NET panel by processing your own
WM_NCPAINT message.

--
Joey Calisay
http://spaces.msn.com/members/joeycalisay/


[quoted text, click to view]

AddThis Social Bookmark Button