# Visual Basic 6 / Justified Text



## hoopkidups (Mar 4, 2004)

Hi,

Is there any way I can justify the text of a label in Visual Basic so that it goes all the way up to the edge of the label, like text in a newspaper column?

Thanks for any help.


----------



## loserOlimbs (Jun 19, 2004)

So you to justify the text in the box? Not Move the label itself right?

Its been a long time since I VBed, but I'll try to help, assuming I make sense of your question.
Sorry, I'm sure its me.


----------



## hoopkidups (Mar 4, 2004)

Yeah, I'm trying to justify the text inside the box.


----------



## loserOlimbs (Jun 19, 2004)

Seems like it SHOULD be
lblwhatever.justify = 
and then 0,1,2, or 3...

Crap its been too long, and I don't have VB loaded...

Where are the pros at?


----------



## RGregory (Jul 27, 2005)

Don't have vb loaded here either, but I think the property you are looking for is "Text Align".


----------



## hoopkidups (Mar 4, 2004)

The property is "alignment", but the only options are 0 - Left Justify, 1 - Right Justify, and 2 - Center.


----------



## cristobal03 (Aug 5, 2005)

Don't you need a RTF control for this not a standard textbox control? I know that's true of VBA; for advanced formatting options in textboxes you have to use a COM control.

chris.


----------



## RGregory (Jul 27, 2005)

The text boxes in .Net allow 9 alignments (Top Left, Top Center, Top Right, Center Left, Center, Center Right, Bottom Left, Bottom Center, and Bottom Right).


----------

