Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Problems with NSComboBoxCell

Problems with NSComboBoxCell
Thread Tools
Brass
Professional Poster
Join Date: Nov 2000
Location: Tasmania, Australia
Status: Offline
Reply With Quote
Jun 15, 2005, 08:46 PM
 
I'm using an NSComboBoxCell in an NSTableView, for and NSTableColumn that is usually going to be very narrow (most of the entries will be 3 or fewer characters of text.

It is using bindings and CoreData, and all works well, except for one annoying cosmetic GUI issue:

Because the table column is narrow, the combo box's drop-down list is also very narrow. So narrow in fact, that only one character is displayed followed by elipses ("..."). Obviously, if I make the table column wider it works around the problem, but making the table column wider would ruin other aspects of the layout on screen.

So is there any way to make an NSComboBoxCell for a table column display its drop-down list wider than the table column itself?

I could get away without using the button or drop-down of the combo box at all, and just take advantage of its built-in auto-completion. Is there anyway to hide the button in an NSComboBoxCell?

The only other thing I can think of to try is to automatically have the column width grow every time it starts editing, and shrink back to its pre-edit size every time editing ends (using delegate methods for the table view for start editing, and for the window's field editor when it ends editing). This might work, but it would be a horrible and ugly kludge.

Any other ideas?
     
   
Thread Tools
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 03:39 PM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,