discuss-gnustep
[Top][All Lists]
Advanced

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

How to set fixed culmn width in NSTableVeiw?


From: Stefan Urbanek
Subject: How to set fixed culmn width in NSTableVeiw?
Date: Sun, 03 Mar 2002 10:38:04 +0100

Hi,

I need to have a table column with fixed width. I've used this:

    col = [[NSTableColumn alloc] initWithIdentifier:StateColumn];
    [col setEditable:NO];
    [col setResizable:NO];
    [[col headerCell] setStringValue:@"State"];
    [col setMinWidth:40];
    [col setWidth:40];
    [col setMaxWidth:40];
    [table addTableColumn:AUTORELEASE(col)];

    /* ... add other columns ... */

    /* Fix Gorm autoresizing */
    [[[table superview] superview] 
                setAutoresizingMask:[table autoresizingMask]];

    [table setAutoresizesAllColumnsToFit:NO];
    [table sizeToFit];

But the column has zero width. If I do not use set*Width, the columns are
resized equally. What is the proper way to set fixed width of column?

Thank you,

Stefan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]