Re: NSPopUpButtonCell in NSTableView - Vertical Alignment?
Re: NSPopUpButtonCell in NSTableView - Vertical Alignment?
- Subject: Re: NSPopUpButtonCell in NSTableView - Vertical Alignment?
- From: Steve Franks <email@hidden>
- Date: Tue, 29 Oct 2002 09:57:33 +0800
Hi Ian,
Thanks for the tip! By setting the table row size bigger and setting
the font smaller I have the text rendering
without clipping.
FYI: I set the text with:
<thePopupButtonCell>.setFont(NSFont.messageFontOfSize(10));
On a related note, if I make the table row very "tall" then its
apparent that the NSTextFieldCells are vertically
aligned to the top of the row, whereas both NSButtonCell's and
NSPopUpButtonCells are center aligned vertically.
Anyway, its working, but I am wondering about the wisdom of using
PopUpButtonCells in tables from an
aesthetic point of view... a lot of noise. I guess thats why people
make it a test field that changes to a
PopUpButton only when being edited....
Cheers,
Steve
ps. I guess incorrectly aligned was a bit strong, as it seems that the
text is clipped within the NSPopUpButtonCell
to preserve padding/margin in the popup cell as part of Aqua guidelines.
On Tuesday, October 29, 2002, at 04:11 AM, Ian Gillespie wrote:
On Monday, Oct 28, 2002, at 11:26 US/Pacific,
email@hidden wrote:
Hi,
I am writing Java/Cocoa apps under 10.2.1 and having cosmetic trouble
embedding a NSPopUpButtonCell in a table.
Everything is working for the popup button EXCEPT the text in the
button itself is obscured. Basically, the bottom 1/3 of the text seems
to be clipped in the popup-button label. Looking at it closer, it
appears that the text in the popup button
is *incorrectly* baseline aligned with the text in the rest of the
row.
I can't find anyway to change this, although I am guessing its in
NSTableView somewhere?! I saw the Jiiva application
builder demo has these working correctly (they add stuff to IB
pallette, I am doing programmatically).
Anybody know the magic incantation to get this to work?
Heres the jist of my code:
NSPopUpButtonCell _menuCell = new NSPopUpButtonCell();
Iterator keys = _bankList.keySet().iterator();
while (keys.hasNext()) {
Greetings, I overcame this problem by increasing the row height in my
tableview in IB.
Goodluck.
___________________________
Ian G. Gillespie
Dept. of Botany & Plant Sciences
University of California
Riverside, CA 92521
http://student.ucr.edu/~gillei01
___________________________
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
--
"Think Twice , Do Once, Repeat As Necessary"
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.