Results 1 to 3 of 3

Thread: changing text align in a combo box?

  1. #1

    Thread Starter
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428

    changing text align in a combo box?

    Is that possible? I want the text to be in the center of the combobox, rather than the default align which is left...
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

  2. #2
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    You could use the padleft method of a string to make it appear centered. It's a pretty weak work around but....
    VB Code:
    1. Dim sTest As String
    2.         sTest = "Centered"
    3.         cboTest.Items.Add(sTest.PadLeft(((cboTest.DropDownWidth / 3) - Len(sTest)) / 2))

  3. #3

    Thread Starter
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428
    oh well, it's pretty stupid if there isnt a good way to do this, hehe

    tnx for the code
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

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