Results 1 to 5 of 5

Thread: Text alignment & wrapping

Hybrid View

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 1999
    Location
    Prague, Czech Republic
    Posts
    350

    Text alignment & wrapping

    The first question is quite simple... is there any way how to make the text (in standard VB5 label) "justified"?

    OK, I have just solved the second one (but If you still wants to know it... how to put the prepositions on the beginnig of the line -> use some cool ASCII chars, like 255, instead of spaces.)

  2. #2
    Lively Member
    Join Date
    Mar 2001
    Location
    Brighton, England
    Posts
    112
    Use the 'alignment' property of the label, you can set it to left, right or centre justified.

    I hope this is what you mean and I haven't got the worng end of the stick !

    cheers

    john

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 1999
    Location
    Prague, Czech Republic
    Posts
    350
    Thank you, but I was thinking about justifing both to left and right together...

  4. #4
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946

    <?>

    Code:
    'try something like this
    'the autosize makes the print fit the label
    'and then I just position the lable in the center of the form
    'you can put it where you like with a few calculations
    
    Private Sub Form_Load()
        Label1.Caption = "Help me out please"
        Label1.AutoSize = True
        Label1.Left = (Form1.Width / 2) - (Label1.Width / 2)
    End Sub
    "A myth is not the succession of individual images,
    but an integerated meaningful entity,
    reflecting a distinct aspect of the real world."

    ___ Adolf Jensen

  5. #5
    Frenzied Member Microbasic's Avatar
    Join Date
    Mar 2001
    Posts
    1,402
    Code:
    Justifying on Labels is
    Impossible,   but  it's
    possible   to   use   a
    custom control.
    
    Or,   try  to  set  the
    number    of     spaces
    along     with      the
    GetPixel command.
    
    Very complicated.


    MicroBasic
    Dragon Shadow Trainer

    There is no good or evil in the world...only programmers and fools .

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width