Scaling custom controls?

O

Ole

I have problems by scaling custom controls in CF2. I have created a simple
control (inherits Control) that act like a label with a frame around. When
showing on a high resolution display (192 DPI) the line is only one pixel
wide even though the rest of the control scales automatically?

Another funny thing is that I have to increase the line width by a factor 4
to make it 2 pixel wide???

Any suggestion what I'm doing wrong and to what I should do to properly
scale my controls?

Thanks,
Ole
 
P

Patrick Hayes

Look at the DataGrid control. It is implementet in managed code only.
Hint: look at the constructor, the static constructor and the renderers
drawing methods.

Use Reflector to do the inspection.

- Mc6Pac
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top