NSTableView / Cocoa - Multi-column table with table-wide section row - swift

I'm working on an MacOS/Cocoa app where an NSTableView contains information on multiple items where information on each item is displayed on multiple rows in a multi-column table with a table-wide "title" row displayed above the information for each item's data.
Here I have three columns: "Page", "Term" and "Popularity". I've implemented code that sets the formatting of the cells in the title row to black with white text via tableView(:viewFor:row:) and have also created a custom row object (the light blue) via custom NSTableRowView::draw( dirtyRect: NSRect).
However, I also need to have the title (truncated to "Her" in this case) span the entire table width and have not found any solutions posted for something like this. Basically I just need the view for the black row w/white text go all the way across all three columns.
Researching the problem I've found a number of potential leads for possible solutions but none seem like a clear winner:
Use of the custom NSTableViewRow and a hand-added NSTextField that floats above the cells in the table, though I've not tried it yet and no idea if the scrolling/stacking will be a headache. Not even sure how to implement something like that but I imagine I could figure it out.
Apple documentation refers to NSTableViewRow::var isGroupRowStyle but I cannot find for the life of me any documentation that actually explains what that's for / how it's used so no idea if that would be of help.
The use of NSTableView "Sections" was also recommended and looks very promising. However it looks to be iOS specific (could be wrong here) and I've not found anything like an example that shows it working w/multiple columns.
Basically what I'm needing is something simple like the HTML RowSpan feature but that's probably expecting too much. Any suggestions for best solutions for this and/or coding examples I could look at?

Related

How to get rid of strange gaps between in sections in tableView

My table view doesn't want to be displayed without weird gaps between its sections. I pinned a screenshot that visually describes the problem.
Note that these gaps are not represented by some kind of UIView, they are just uncovered pieces of the table.
I tried both view/heightForFooterInSection, it did not give me any results.
Methods view/heightForHeaderInSection are already in use (labels describing sections name, seen on the screenshot. If heightForHeaderInSection is set to 0 or any other value less than 10, labels start to look cut.
However I did find the solution: the method tableView.sectionHeaderTopPadding
works just fine, but is only available from iOS 15, that does not arrange me.
I will be grateful for any help. I just don't want tot believe that Apple didn't provide us with any ways to solve this for iOS older than 15.

Can access display multiline captions in Access 365 form datasheet view?

I have read about using VBA to concatenate terms together using VbCrLf; I personally used Ctrl-Enter to create a second line in the caption field in the properties box.
But, after I do my ctrl-enter, it then only shows the first line of my multi-line caption in the datasheet view of my form.
becomes this...
This form is meant to recreate the functionality our owner is looking for from a current excel spreadsheet (the ability to sort on various columns), so I can't just use a report.
Please tell me I'm missing something obvious such as a caption height property value or something. The multiline caption will be very useful to help maintain appropriate column widths for the data.
Whilst you can display multiple lines of content within the datasheet view for a table by increasing the row height of each record, e.g.:
A more appropriate solution might be to use a text box on a form to display the data, where the height of the text box can be predefined in the design of the form, and scroll bars can be displayed:
There is no solution to adjusting column headers in the specific "datasheet" form that I was trying to use. It's a nice quick way that works for 95% of your uses. But, if you need more control (like me and others on the internet) the only solution is to create the form as a "Tabular" form in the form wizard. There are other descriptions of this type of form in Access (just to be confusing).
This is also described as a continuous form likely because that's the form property value toggle when you dive into the details.
It's more work but you have full control over the size, format, etc. of your column headers when creating/designing a tabular form.

How can I style a cell or row/column of cells in NatTable programatically?

I'm having a hard time figuring out how to individually style a cell or group of cells when a certain thing happens. For instance I would like to be able to right-click on a cell and hit something like "tag" and it would change the background color of the cell to something different. I would like to do the same thing with rows, columns, or any random group of selected cells. I also need this change in style to persist even if the cell(s) are moved beyond the viewport layer's view.
If you have a hard time with NatTable, maybe it is worth reading some of our tutorials and documents.
https://www.eclipse.org/nattable/documentation.php?page=styling
http://www.vogella.com/tutorials/NatTable/article.html
In short related to your question. Individual styling is done via config labels on a cell and styles that are registered in the ConfigRegistry for that label. So what you need to do is to implement some sort of label registry based on cell indeces. That label registry then needs to be used by a custom ConfigLabelAccumulator so the labels are attached to the cells with the corresponding indeces.
We have a basic implementation on a column base via the ColumnStyleEditorDialog. This can be seen in the _000_Styled_grid example by clicking on the column header and call "Format cells". Personally I think that feature is not complete, but it should help you in seeing how it works in principle.

VerticalLayout dynamically hiding visibility

I was wondering whats the best way around dynamically hiding some menu items. At the moment I have 6 items just in a matrix layout row. I want to have 3 items aligned left and 3 items alligned right. If one of the items is set to not visible I want it to move accross. I've done something similiar in a horizontal layout and setting the visibility to hidden. I was wondering if this would work with a vertical layout? Having trouble trying to figure out exactly how I would do it as I'm quite new to UI5 xml css and javscript. Any help would be great.
Also I'm having one other issue unrelated to this, I cant seem to bind my json model to my xml fragment, if I use the same code on my normal xml view it prints out the model data. But on my fragment it just prints it like {person>/fullName} any ideas ?
Belongs to your second question.
Maybe your binding was quoted on copy and paste? Check the native XML Code.
If no data are shown (not "{person>/fullName}"), add dependent to connect the models of your view
var oFragment = sap.ui.xmlfragment(sFragment, "fragmentName", this);
oView.addDependent(oFragment);

How to alter title bar height for access form?

Is there a way of altering the title bar height for a form (actually a subform) when it is displayed in datasheet mode?
My field titles are often longer than the data and there is not very much I can do about this. It's not a problem when the form is in 'Single Form' view, but there will be lots of times when the datasheet view is helpful, because it's a good summary of info.
I had thought that forcing a new line in the field title might work, but it doesn't.
Access does not allow for this to be done. The standard way most Access developers circumnavigate this issue is to use labels. Set your DatasheetCaptions to blanks ("") and use labels as your column headers. This way you can multi-line them or format them however you want.