We have a drop-down menu for the user to switch between several accounts or profiles, and these accounts are identified by their legal entity name. There's a higher than random chance that many of the names for a given user would be very similar, as in the following:

  • Proactive Plumbing Inc.
  • Proactive Plumbing QLD Division P/L
  • Proactive Plumbing New South Wales
  • Proactive Plumbing, Bedrooms, and Kitchens
  • Proactive Plumbing Workers Pension Fund New South Wales

The problem is that we don't want to show the full length name in the drop-down menu, as it could become unwieldy in width. Similarly, we can't simply truncate or elide on some blind rule.

Any suggestions?

  • Some sanity prevails - the business stakeholders will compromise on the potential maximum string length, reducing from 100 characters down to 50 characters. Still too long of course.
    – Erics
    Sep 27, 2011 at 7:22

2 Answers 2


Possibility I

Why don't you use title attribute so when user pauses mouse cursor on such item, a hint/tooltip would display the whole text. This can also be used for a custom tooltip solution that would display tooltip immediately when element is too wide.

Possibility II

Second possibility is to use custom drop down solution with shifting element content. So when a wider (by content) element is paused on it would automatically get scrolled to the right to reveal all content. This is somehow similar to phone phonebooks which had names wider than screen with could deliver. Names simply got scrolled to the right.


The first one is of course faster for users to use. And using some custom tooltip solution it could as well mean that positioning of the tooltip may be crucial to usability to make things as fast to use as possible.

The second on seems somehow more natural, but depending on the text length and shifting speed it may take some time to get to the unique part of the content.

  • Eeew. Autoscrolling? No thanks. Unless it is only auto-scrolled when the mouse is near a left or right edge. Sep 26, 2011 at 6:58
  • @MarjanVenema: Implementation is of course on the implementer. Could just as well have a right side bar similar to Win7 taskbar that would scroll the item when moused over it. Sep 26, 2011 at 7:01
  • yes, there are plenty of options to implement it, I just wanted to express my dislike of UI's that try to be helpful automatically but really only take control away from me. I used to hate the auto-scrolling in the Windows Explorer until the sensitive area became smaller and the pause before scrolling longer. Similar with auto-scrolling in Word when dragging text. I never could get Word to stop where I wanted it to until it slowed down the scrolling... Sep 26, 2011 at 7:09

If you detect 4 or more consecutive items with more than 1 word repeating at the beginning, group them:

Proactive Plumbing
 ... Inc.
 ... QLD Division P/L
 ... New South Wales
 ..., Bedrooms, and Kitchens
 ... Workers Pension Fund New South Wales
Something completely different
  • Ah, good insight - if there exist similar names, the similarity is likely to be at the start of the name and that can be elided.
    – Erics
    Sep 26, 2011 at 9:18
  • 1
    This is a really nice way of doing it but there's a caveat to this pattern... It's hard(er) to find the correct item when they're alphabetically ordered because when an item has many variants you don't see where you are, when original item is above the visible box. Maybe at least keep the first letter before ellipsis to keep usability of alphabetic ordering... Like: P... QLT Division P/L Sep 26, 2011 at 9:28
  • 2
    Another problem: What if you had Proactive America, Proactive Inc., Proactive Overseas Ltd., Proactive Worldwide and then a few of Proactive Plumbing ... How should your truncation work in this case? Should all fall under Proactive or should they be segregated on repeated pattern? Sep 26, 2011 at 9:31
  • 1
    @Nikita: You do realise that locating these split points in strings (especially in cases some set is a subset of the other) is not as simple as it seems to be to humans. Algorithm should actually create sets of items with same first word. Then recursively do the same thing on every set while cutting off the first word (and counting set sizes to only create sets of 3+ items). A nice development problem actually. :) Sep 26, 2011 at 11:33
  • 1
    Do we have a UX.SE tag for np-hard yet?
    – Erics
    Sep 27, 2011 at 7:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.