ClientRectangle

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi

I have a control I am designing which is very similar to the ListView control in Details mode. However, I want to draw the column headers outside of the client region of the control so that they dont scroll along with the the rest of the contents (I'm using AutoScroll). I've looked extensively at help, but the only function I seem to be finding is this.ClientRectangle, but I can't get it to work

If, for example, I needed to start the client area of the control from {X=0, Y=50}, how would I go about setting this

Thanks

Yaron
 
Hi Yaron,
It is not so easy to draw outsite client area. In Win32 specfying the size
of client rect is done via WM_NCCALCSIZE. However it is not a pleasure to
handle that message.

That control of yours can be composed of two child controls. One which will
draw the headers (docked *top*) and one that will have the scroll bars and
will draw the content of the lsit docked *fill*. This way you don't have to
worry about the headers.
--
B\rgds
HTH
100 [C# MVP]

Yaron said:
Hi,

I have a control I am designing which is very similar to the ListView
control in Details mode. However, I want to draw the column headers outside
of the client region of the control so that they dont scroll along with the
the rest of the contents (I'm using AutoScroll). I've looked extensively at
help, but the only function I seem to be finding is this.ClientRectangle,
but I can't get it to work.
If, for example, I needed to start the client area of the control from
{X=0, Y=50}, how would I go about setting this?
 
Back
Top