[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 647
  • Last Modified:

How to adjust text padding when using drawstring?

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
atlind
Asked:
atlind
1 Solution
 
atlindAuthor Commented:
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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now