开发者

setScrollable not working for NSTextFieldCell

开发者 https://www.devze.com 2023-02-25 07:02 出处:网络
I want my each table cell to be scrollable since its editable.I am using self.nsChildTextFi开发者_StackOverflow中文版eldObj = [[NSTextFieldCell alloc] init];

I want my each table cell to be scrollable since its editable.I am using

        self.nsChildTextFi开发者_StackOverflow中文版eldObj = [[NSTextFieldCell alloc] init];
        [self.nsChildTextFieldObj setControlView:self.controlView];
        [self.nsChildTextFieldObj setBackgroundStyle:self.backgroundStyle];
        [self.nsChildTextFieldObj setScrollable:YES];
        [self.nsChildTextFieldObj setFont:[NSFont fontWithName:appDelegate.selectedFont size:appDelegate.selectedFontSize]];
        [self.nsChildTextFieldObj setEditable:NO];

but my table view cell is not scrolling .Please help!


I think you can make use of sizeWithFont method.

Use it with every keypress or upon paste and change the height of self.nsChildTextFieldObj dynamically.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号