• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSOutlineView Column Empty
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSOutlineView Column Empty


  • Subject: Re: NSOutlineView Column Empty
  • From: Antonio Ferraioli <email@hidden>
  • Date: Sat, 19 Feb 2005 12:47:54 +0100

Thank you very much,
this solved the problem

I was already using a ParagraphStyle for showing text
so I just had to set

	 [sTruncatableStyle setLineBreakMode:NSLineBreakByTruncatingTail];

antonio

On 19/feb/05, at 10:24, Stéphane Sudre wrote:


On vendredi, février 18, 2005, at 11:58 PM, Antonio Ferraioli wrote:

Hello,

I'm using an NSOutlineView
some of the rows in the list are showed empty also if they contain
some text data.

The problem seem to be that rows containing short text are correctly
visualized, while the ones containing very large text that exceeds the NSOutlineView width
are showed as empty.


I don't know if it exists some flag that forces NSOutlineView to visualize the content
(also truncated should be ok for me) for "large" content rows



in - (id)outlineView:(NSOutlineView *)olv objectValueForTableColumn:(NSTableColumn *)tableColumn byItem:(id)item


[...]

if([[tableColumn identifier] isEqualToString: @"YourColumnIdentifier"])
{
static NSDictionary * sTruncatedAttributes=nil;


        if (sTruncatedAttributes==nil)
        {
            NSMutableParagraphStyle * sTruncatableStyle;

sTruncatableStyle=[[NSParagraphStyle defaultParagraphStyle] mutableCopy];

if (sTruncatableStyle!=nil)
{
[sTruncatableStyle setLineBreakMode:NSLineBreakByTruncatingTail];


sTruncatedAttributes=[[NSDictionary alloc] initWithObjectsAndKeys: sTruncatableStyle,NSParagraphStyleAttributeName,
nil];


                [sTruncatableStyle release];
            }
        }

        objectValue = @"yourString";

if (sTruncatedAttributes!=nil)
{
return [[[NSAttributedString alloc] initWithString:objectValue attributes:sTruncatedAttributes] autorelease];
}


        return objectValue;
    }



_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Re: NSOutlineView Column Empty (From: Stéphane Sudre <email@hidden>)

  • Prev by Date: Textfields in sheet not getting focus
  • Next by Date: Re: Textfields in sheet not getting focus [solved]
  • Previous by thread: Re: NSOutlineView Column Empty
  • Next by thread: Finding a view (Cocoa theory)
  • Index(es):
    • Date
    • Thread