My textboxes use Tahoma, 9. I want to use the same for my grid. Is is
possible? How do I do this?

I found this:
DataGrid1.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!,
System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0,
Byte))

in another forum, but I'm getting "'Point' is not a member of
'System.Drawing.GraphicsUnit'."
If I change Point to Pixel, I get "Overload resolution failed because no
accessible 'New' accepts this number of arguments."

Re: How to change the font in the grid? by Tim

Tim
Fri Apr 01 18:49:53 CST 2005

I assume by your other post that you're dealing with the Compact Framework.
Not all the constructor overloads for the Font class are supported in the
Compact Framework. Try using the code below.

DataGrid1.Font = New Font("Tahoma", 9.0, FontStyle.Regular)

--
Tim Wilson
.Net Compact Framework MVP

"Eve" <Eve@discussions.microsoft.com> wrote in message
news:242919C0-F293-49E1-83C8-B902C0AB4A7E@microsoft.com...
> My textboxes use Tahoma, 9. I want to use the same for my grid. Is is
> possible? How do I do this?
>
> I found this:
> DataGrid1.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!,
> System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point,
CType(0,
> Byte))
>
> in another forum, but I'm getting "'Point' is not a member of
> 'System.Drawing.GraphicsUnit'."
> If I change Point to Pixel, I get "Overload resolution failed because no
> accessible 'New' accepts this number of arguments."



Re: How to change the font in the grid? by Eve

Eve
Tue Apr 05 13:03:03 CDT 2005

It worked! Thank You!

"Tim Wilson" wrote:

> I assume by your other post that you're dealing with the Compact Framework.
> Not all the constructor overloads for the Font class are supported in the
> Compact Framework. Try using the code below.
>
> DataGrid1.Font = New Font("Tahoma", 9.0, FontStyle.Regular)
>
> --
> Tim Wilson
> ..Net Compact Framework MVP
>
> "Eve" <Eve@discussions.microsoft.com> wrote in message
> news:242919C0-F293-49E1-83C8-B902C0AB4A7E@microsoft.com...
> > My textboxes use Tahoma, 9. I want to use the same for my grid. Is is
> > possible? How do I do this?
> >
> > I found this:
> > DataGrid1.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!,
> > System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point,
> CType(0,
> > Byte))
> >
> > in another forum, but I'm getting "'Point' is not a member of
> > 'System.Drawing.GraphicsUnit'."
> > If I change Point to Pixel, I get "Overload resolution failed because no
> > accessible 'New' accepts this number of arguments."
>
>
>