Results 1 to 2 of 2

Thread: Centering Labels in shapes

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2000
    Posts
    14
    Is there anyway to automatically center a label array inside of a shape array. I need to be able to change the font of the label caption during runtime but that uncentered it. thx

  2. #2
    Hyperactive Member
    Join Date
    Mar 2000
    Posts
    461
    Code:
    label1.AutoSize = True
    label1.Caption = "Whatever you want"
    
    label1.left = (shape1.width - label1.width) / 2
    This is providing that label1.left is an offset of shape1 such that label1.left would be right on the border of shape1

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