Results 1 to 10 of 10
  1. #1
    Plutonium Lounger Leif's Avatar
    Join Date
    Dec 2000
    Location
    U.K.
    Posts
    14,010
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Combobox alignment (2000+)

    I have a ComboBox which I am populating with 24 values (10 to 240 step 10).

    Because the values are numbers, I have set alignment to be right-justified. However, the number of values invokes the scroll bar which is hiding the list!
    (The actual list is correct, I can select a value and it loads.)

    What do I do?
    Attached Images Attached Images
    • File Type: gif x.gif (3.1 KB, 0 views)

  2. #2
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts

    Re: Combobox alignment (2000+)

    There's probably a much simpler way that's escaping me temporarily, but you could just make the column count 2 and set the first column's width to say 15pts less than the width of the combo?
    Regards,
    Rory

    Microsoft MVP - Excel

  3. #3
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts

    Re: Combobox alignment (2000+)

    Or set the list rows to 24 so there is no scrollbar!
    Regards,
    Rory

    Microsoft MVP - Excel

  4. #4
    Plutonium Lounger Leif's Avatar
    Join Date
    Dec 2000
    Location
    U.K.
    Posts
    14,010
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Combobox alignment (2000+)

    Setting list rows to 24 does work - except that the bottom of the list disappears off-screen if it is low down the form <img src=/S/laugh.gif border=0 alt=laugh width=15 height=15>

    Setting columns to 2 helps, but you then need the horizontal scrollbar to see the values.

    I haven't learnt enough yet to know what half the properties are (and I've left me book at home...) so I'm struggling a bit in the dark here. If need be, I'll just settle on Left or Center Aligned - it's not worth too much effort!

    Thanks!

    (PS - example attached.)
    Attached Files Attached Files

  5. #5
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts

    Re: Combobox alignment (2000+)

    I've tweaked the right-align one.
    Attached Files Attached Files
    Regards,
    Rory

    Microsoft MVP - Excel

  6. #6
    Plutonium Lounger Leif's Avatar
    Join Date
    Dec 2000
    Location
    U.K.
    Posts
    14,010
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Combobox alignment (2000+)

    Ah - that's what you meant by the 'first' column width! Perfect!

    I'll get the first round in for that <img src=/S/grin.gif border=0 alt=grin width=15 height=15> - thank you!

  7. #7
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Combobox alignment (2000+)

    I'd stick with left alignment. If you want the numbers to be aligned correctly, you can format them:
    <code>
    .AddItem Format(m * 10, "000")</code>

  8. #8
    Plutonium Lounger Leif's Avatar
    Join Date
    Dec 2000
    Location
    U.K.
    Posts
    14,010
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Combobox alignment (2000+)

    Aha - another solution. I'll play around with this too and see what looks best. (Looks like I'm down for the first two rounds now <img src=/S/laugh.gif border=0 alt=laugh width=15 height=15> )

    Thanks!

  9. #9
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts

    Re: Combobox alignment (2000+)

    No way, Jose! It's my round - I'm tired of all the abuse!! <img src=/S/grin.gif border=0 alt=grin width=15 height=15>
    Regards,
    Rory

    Microsoft MVP - Excel

  10. #10
    Plutonium Lounger Leif's Avatar
    Join Date
    Dec 2000
    Location
    U.K.
    Posts
    14,010
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Combobox alignment (2000+)

    So that's what the <IMG SRC=http://www.wopr.com/w3timages/print.gif alt="Get it in writing!" title="Get it in writing!"> icon is for <img src=/S/grin.gif border=0 alt=grin width=15 height=15>

Posting Permissions

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