[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Auto-width correction in popup-menus?



svspire@somnet.sandia.gov (Shannon V Spires) writes:

>Has anybody written code to automatically correct the width
>of a popup-menu item depending on the width of its current
>default item? It's annoying that the menu automatically
>width-corrects itself when it's pulled down, but it snaps
>back to its original width when released, even if the new
>default item is too long to fit.

>Shannon Spires
>svspire@sandia.gov


You may be giving the pop-up-menu dialog-item an explicit :view-size
which is smaller than you want.  I think the view-default-size method
will do the right thing if you don't specify a :view-size.  

I'm not sure what would happen if you add menu-items on the fly.  You
probably have to recalculate the view-size yourself.

By the way, I just posted my personal patch for pop-up-menus.  It's in
cambridge.apple.com:/pub/MCL2/contrib/pop-up-menu-patch.sit.hqx.

Here are the new features:

 * Pop-up-menus now pop-up in the view-font. 
 
 * Allow pop-up-menus to be installed in the menu bar as regular menus.
 
 * Fixed view-default-size to handle fixed string item-display better.

 * For fixed string item-display, pop-up menu now looks more like a regular 
   menu:  the title highlights and the pop-up lines up below it.

-- 
 Steve Miner	    |    Insufficient facts always invite danger.     
 miner@tc.pw.com    |	      -- Spock, "Space Seed," stardate 3141.9.