Results 1 to 3 of 3

Thread: Center Text in Picture Box

  1. #1
    Guest

    Post

    Is there a way to center the Text in a picture box?

  2. #2
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431

    Post

    Sure.
    Code:
    Const MYTEXT = "I'm centered"
    
    Picture1.CurrentX = (Picture1.Width / 2) - (TextWidth(MYTEXT) / 2)
    Picture1.CurrentY = (Picture1.Height / 2) - (TextHeight(MYTEXT) / 2)
    Picture1.Print MYTEXT
    ------------------
    Marty

  3. #3
    Guest

    Post

    Thanks alot. Worked great!

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