Solved

How to adjust text padding when using drawstring?

Posted on 2008-10-05
1
573 Views
Last Modified: 2013-11-26
The app that I am writing is to act as an editor for software screens that are a part of the software that belongs to my company.  Where there screen is designed by strictly typing in variables into a text file, I am trying to create a drawing program that will allow me to simply draw the objects just as you might do with a paint program.

So to start, I load my screen based on the very same file that was first created by hand typing the values.  So far everything is working perfectly.  All the elements are of the exact same size, shape and color of the elements as they appear in my companies software.  With just one exception...........

I am using drawstring to paint some text on the screen by taking the top, left, width, text and font values from the text file.  I draw the text and draw a rectangle around the text (same rec as for drawstring) and while the rectangle appears to be the exact same shape and size between the two screens as do the size of the font, it appears as if drawstring has some sort of padding around the text.

The result is the text doesn't fit in the text box correctly.

Anyone have any ideas on how to adjust this in VB.net?

This padding is the only thing keeping me from sending this app to the beta testers!

Thanks in advance.
0
Comment
Question by:atlind
1 Comment
 

Accepted Solution

by:
atlind earned 0 total points
ID: 22646775
Found the solution for me.  Thanks anyway tho.

Since line warping is not supported by my companies app anyway, turning this off on my app makes the text display correctly.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Normally the drop down box control found in the .Net framework tools is able to select just one data and value at a time, which is displayed on the text area.   But what if you want to have multiple values to be selected in the drop down box? As …
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now