Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / April 2005

Tip: Looking for answers? Try searching our database.

How to change the font in the grid?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Eve - 02 Apr 2005 00:01 GMT
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."
Tim Wilson - 02 Apr 2005 01:49 GMT
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)

Signature

Tim Wilson
.Net Compact Framework MVP

> My textboxes use Tahoma, 9. I want to use the same for my grid. Is is
> possible? How do I do this?
[quoted text clipped - 8 lines]
> If I change Point to Pixel, I get "Overload resolution failed because no
> accessible 'New' accepts this number of arguments."
Eve - 05 Apr 2005 19:03 GMT
It worked! Thank You!

> 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
[quoted text clipped - 15 lines]
> > If I change Point to Pixel, I get "Overload resolution failed because no
> > accessible 'New' accepts this number of arguments."

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.