Hello
I have a table view, that displays the elements in a table view, each
row consists of an nsimagecell and an nstextfieldcell.
I want to let the user choose whether he sees the items big or small
in this list, i.e. whether each row is 40 px "tall", or 15 px.
I have implemented an NSTableView  delegate's method:
- (CGFloat)tableView:(NSTableView *)tableView heightOfRow:(NSInteger)row {
    if(iconsAreSmall) {
                return 18;
        } else {
                return 35;
        }
}

Where this iconsAreSmall is set to YES or NO, when the user clicks on
the corresponding radio button:
-(IBAction)radioGroupMatrixClicked:(id)sender {
    iconsAreSmall = [sender selectedRow];
    [tableView reloadData];
}

However, I am getting a weird behavior, the items are not displayed
smaller or larger, instead they just overlap, the image cell is not
being scaled normally.
I suppose, instead of calling [tableView reloadData] i need to direct
table view to relayout itself completely from scratch.
How can I do that?
I have tried -setNeedsLayout:YES and -setNeedsDisplay:YES, but with no effect...

Thank you
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to