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 / June 2007

Tip: Looking for answers? Try searching our database.

Text box size

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
John - 29 Jun 2007 04:32 GMT
Hi

I am using Tahoma 8 size for my text boxes which is changed to Tahoma,
8.25pt by the system. The height of my text boxes is 21 with this font size.
Is there a way to reduce the height to 20 without much effecting the font
size?

Thanks

Regards
Randy - 29 Jun 2007 06:21 GMT
I'm surprised.  I have lots of textboxes with this font size that have
a height of 20.  Is your font Microsoft Sans Serif, Regular?  Can you
just change the size properties to a height of 20?   If you are
looking for code it is:

mytb.Size = New System.Drawing.Size(100, 20)

HTH,
Randy
John - 29 Jun 2007 07:51 GMT
Hi

Setting the font to Microsoft Sans Serif, Regular does change the height to
20 but I am using Tahoma 8 which becomes Tohama 8.25 when saved and keeps
the text box height at 21. I have manually tried to change the height of
control to 20 it goes back to 21.

Thanks

Regards

> I'm surprised.  I have lots of textboxes with this font size that have
> a height of 20.  Is your font Microsoft Sans Serif, Regular?  Can you
[quoted text clipped - 5 lines]
> HTH,
> Randy
Bob Powell [MVP] - 30 Jun 2007 21:38 GMT
Remove the borders from the text box.

Signature

--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.

> Hi
>
[quoted text clipped - 6 lines]
>
> Regards

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.