Results 1 to 3 of 3

Thread: Centering text in combo

  1. #1

    Thread Starter
    Fanatic Member coox's Avatar
    Join Date
    Oct 1999
    Posts
    550
    Anyone know if this is poss, or do I somehow have to create my own control?

  2. #2
    Fanatic Member
    Join Date
    Mar 2000
    Location
    That posh bit of England known as Buckinghamshire
    Posts
    658
    Just an idea.

    Make sure the font of the form is set to the same font of the combo box.

    You can then use the TextWidth() function to find out how wide the word will be. You can then use the TextWidth function on a space " ", to find out how many are needed to fill the text to the end of the combo box.

    Divide the result by two, and you will know how many spaces to put either side of the text to make it appear centered.

    Hope it helps.
    Iain, thats with an i by the way!

  3. #3

    Thread Starter
    Fanatic Member coox's Avatar
    Join Date
    Oct 1999
    Posts
    550
    Thanks Iain, I'll give it a go.

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