I am new in Swift cocoa programming and I am trying build a finance program. I am almost done but I am stuck with the following problem. I am trying to print a multipage NStableView from a storyboard with textlabel bfore and after. I can print the NSView without issue if the tableView is fit in one page. If more than one page, only the first page show up. I did not found how to expand the Tableview.
I have search through all the post without a valide solution.
I can print the NSTableView itself without the NSView and it will show all the pages. But of course, it wont print the accompagning textlabel, nor the TableheaderView.
I have manage to adapt an exemple that let me print the whole table with its header, but no textlabel. It rebuilt the table cell by cell for printing.
I have also found a more promissing exemple, were I can print all what I need with a stackView.
2 problems :
- The tableView print fine inside the stackView but it want to resize or cut the last column. I had to play with the frame size and other option with partial success.
- I have tried to print the TableHeaderView separatly in its stackView but that did not work well. So I draw in the storyboard a serie of label in an horizonal StackView that match the tableView header. Eveything look fine in the Storyboard but the program resize each label before printing. Could not find a solution for taht problem.
Any suggestion would be appreciate. Is SwiftUI easier to use? I would have to update my OS to 10.15...
The solution that I have found for now is the build my printout in Stackview, but there must be a better solution. The TableView print fine inside the Stackview but the HeaderView don’t print. The solution I used is to rebuild an HeaderView with a series of labels and put them inside a horizontal StackView that I can print in the vertical Stackview before the table. The header is designed in the storyboard. Note that the printing parameters were not completely optimized, I am just starting with Xcode.the printout include a Title, the headerView, the TableView and a Label with the Inventory total. The table can be multipage. The content of the table is fictive]1