Search code examples
objective-ccocoaxcodensoutlineview

NSOutlineView indentation Problem


For the custom requirement, i need to handle displaying of Cell, i.e. In short in my application i subclass NSCell to ImageTextCell (standard form Apple ) and using the same to display the Cell,

When it comes to indentation, i could see, all the element having same indentation, i.e. in my outline view i have two group and each group having more then two child element + three child element (i.e. Non Group Item ) on the top level, But the strange thing is all the element are displaying at the same level, do i need to set anywhere indentation level and should take care of displaying text and image as per indentation level ?


Solution

  • Your cell drawing code is probably hardcoding 0 as the x-coordinate to draw from, rather than respecting the cell bounds passed to it. In short, you do not need to do anything special to handle indentation; we can't really help more without seeing some code.