PC Review


Reply
Thread Tools Rate Thread

ControlPaint.DrawGrid

 
 
Tomasz Kulig
Guest
Posts: n/a
 
      21st Sep 2005
Hello...
I've some annoying problem when I use DrawGrid method.
It seems that it ignores nOffsetX and nOffsetY (refer to example code).

Bounding rectangle can be moved, but points of grid are being drawn
always in the same positions of screen.

Do you have some idea how to fix it? I want to see dots exactly drawn
from specified point.


Code example.

int nOffsetX = 5;
int nOffsetY = 5;
ControlPaint.DrawGrid(
g,
new Rectangle(nOffsetX, nOffsetY, 100, 100),
new Size(10, 10),
Color.White);
 
Reply With Quote
 
 
 
 
=?Utf-8?B?TWFyayBSLiBEYXdzb24=?=
Guest
Posts: n/a
 
      21st Sep 2005
Hi Tomasz,
apply a translation transform to the graphics object, this will move the
co-ordinate system around. Try calling TranslateTransform.

Mark R Dawson
http://www.markdawson.org



"Tomasz Kulig" wrote:

> Hello...
> I've some annoying problem when I use DrawGrid method.
> It seems that it ignores nOffsetX and nOffsetY (refer to example code).
>
> Bounding rectangle can be moved, but points of grid are being drawn
> always in the same positions of screen.
>
> Do you have some idea how to fix it? I want to see dots exactly drawn
> from specified point.
>
>
> Code example.
>
> int nOffsetX = 5;
> int nOffsetY = 5;
> ControlPaint.DrawGrid(
> g,
> new Rectangle(nOffsetX, nOffsetY, 100, 100),
> new Size(10, 10),
> Color.White);
>

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
System.Windows.Forms.ControlPaint.DrawGrid equivalent? Wade Microsoft Dot NET Compact Framework 4 15th Mar 2006 11:21 PM
ControlPaint DrawGrid Malfunction? Albert Nassauer Microsoft Dot NET Framework Forms 0 17th Feb 2004 10:58 PM
ControlPaint.Drawborder Alejandro K. Microsoft VB .NET 0 11th Feb 2004 02:08 PM
DrawGrid property setting itself! Rob Richardson Microsoft VB .NET 0 31st Jan 2004 01:47 AM
ControlPaint in CF ? =?Utf-8?B?S2V2ZW4gQ29yYXp6YQ==?= Microsoft Dot NET Compact Framework 1 29th Jan 2004 05:11 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:05 AM.