Aligning Text in a Label

  • Thread starter Thread starter fripper
  • Start date Start date
F

fripper

Oh, VB 6.0 was so simple ... but how in VB .Net do I set the alignment of
the text in a label control so that it is centered vertically and
horizontally? I know that this is a question for .Net 101 students but I
have not been able to find an answer by looking at .Net's Help. I see
references to things like system.drawing.contentalignment.centermiddle (or
is it middlecenter?) but I don't know how to use it. They seem to be
awfully thin on including code samples.

Can someone point to an answer? Thanks.
 
Oops ... TextAlign is OK for a Windows form but not a Web form ... it is not
a member of system.web.ui.webcontrols.label
 
* "fripper said:
Oops ... TextAlign is OK for a Windows form but not a Web form ... it is not
a member of system.web.ui.webcontrols.label

Notice that there is a separate group available for ASP.NET Web
Controls:

<URL:
 
Back
Top