Use Style.Add to Set a Label's Line Height Property
December 2015

One of the applications I developed was displaying text in a label control that looked like this:


Line Height too Small.

I wanted it to look more like this:


Line Height is Good.

So I searched the web and found that I could set the line height property using a VB.Net statement similar to:

Label1.Style.Add("line-height", "1.5")

I wrote an app that demonstrates setting the line height and font size of a label. Click here to run the app. Here are some samples created by the app:


The app's default settings.


Smaller line height and font.


Large line height and font.

Download VB.Net Code

Click here to download the VS2008 VB.Net source code [68k].

Previous Tip   Tip Index   Next Tip

Home

Updated 2016/12/02