+ Reply to Thread
Results 1 to 4 of 4

cmbobox shrink to fit

  1. #1
    Shawn
    Guest

    cmbobox shrink to fit

    I have a combo box and sometimes the text it is linked to is longer than the
    box. Is there a way I can get the text to "shrink to fit"?


    --
    Thanks
    Shawn

  2. #2
    Registered User
    Join Date
    08-09-2006
    Posts
    30
    right click on the cell that needs to shrink, click format cells, then under the alignment tab, check "shrink to fit" at the bottom of the page.

  3. #3
    Shawn
    Guest

    Re: cmbobox shrink to fit

    Thanks. However, what I need is the text in the combo box to shrink to fit
    the size of the combo box.
    --
    Thanks
    Shawn


    "flyingmeatball" wrote:

    >
    > right click on the cell that needs to shrink, click format cells, then
    > under the alignment tab, check "shrink to fit" at the bottom of the
    > page.
    >
    >
    > --
    > flyingmeatball
    > ------------------------------------------------------------------------
    > flyingmeatball's Profile: http://www.excelforum.com/member.php...o&userid=37302
    > View this thread: http://www.excelforum.com/showthread...hreadid=572757
    >
    >


  4. #4
    NickHK
    Guest

    Re: cmbobox shrink to fit

    Shawn,
    I would guess you have a couple of options:
    - Set the combox to use a fixed width font. When you load the combobox,
    multiply the number of characters in the longest entry by set some set
    number. Add some for the left margin and some for the down arrow on the
    right. Set the combobox width to this. Or reduce the font size until the
    above calculation comes out <= combox.width
    - If your list is on a worksheet, make sure the list and combobox have
    the same font characteristics. Autosize the list column. Synchronise the
    combox width and column width
    - Set the combox.ListWidth to a large number so that the full text can be
    seen in the list if not in the edit part of the combobox.

    NickHK

    "Shawn" <Shawn@discussions.microsoft.com> wrote in message
    news:1669973B-0D26-418C-947E-85B90490D409@microsoft.com...
    > I have a combo box and sometimes the text it is linked to is longer than

    the
    > box. Is there a way I can get the text to "shrink to fit"?
    >
    >
    > --
    > Thanks
    > Shawn




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1