I populated a NSTableView with some data, and one of the cells truncates the text.
I have searched for how to not truncate this string, but I only found resources indicating how to voluntarily truncate the text.
I fill the text like this :
extension MessagesViewController: NSTableViewDelegate {
func tableView(_ tableView: NSTableView, viewFor tableColumn: NSTableColumn?, row: Int) -> NSView? {
...
...
...
/* Set the information in a cell and return it. */
if let lCell: NSTableCellView = tableView.makeView(withIdentifier: NSUserInterfaceItemIdentifier(rawValue: lCellIdentifier), owner: nil) as? NSTableCellView {
lCell.textField?.stringValue = lText
lCell.imageView?.image = lImage ?? nil
lCell.textField?.toolTip = lText
lCell.textField?.autoresizesSubviews = true
//lCell.textField?.
return lCell
}
The result I get is the following :
I want the "data" field to show the whole contents of the string. I sized the length of the column for it to fit.
Any help would be appreciated, Thanks, Clovel