I've just come across the new Grid layout system in Umbraco, which seems quite interesting, however I can't seem to find a way to include a grid within a grid.
I've added a simple 2 column row onto a page in the example below, but now I want to add another 2 column row within it to fill in the 2 red squares. Is this not possible or am I missing something obvious?
If I click any of the layouts at the bottom it instead adds them as an extra row to the bottom of the page rather than inside an existing grid.
The only way to include a grid in a grid (that I'm aware of) is to use the Doc Type Grid Editor package: https://our.umbraco.org/projects/backoffice-extensions/doc-type-grid-editor
This package allows any Document Type to be the basis for a grid editor. I was able to create a grid editor that was a set of tabs where each tab had a grid data type for the content. The data type was specific to tabs so you couldn't create tabs in a tab.
I also created a package (v7 Dialog Expander) to allow the dialog flyout to expand: https://our.umbraco.org/projects/backoffice-extensions/v7-dialog-expander. I did this because a grid in the small width of the dialog flyout was just too small.
It is definitely possible and actually has worked out well so far. That said, I would tread lightly here because there could be issues that we haven't yet discovered as this solution is still on a development project.
Related
I'm looking for a way of creating accordion entries with formatted vertical divisions.
Think a table that when a row is clicked it expands, as an accordion does, to show the content related to the row.
It sounds like you’d need to make a custom widget, but that’s ok as Fyne is designed to make that possible :).
https://developer.fyne.io/extend/custom-widget
What I'd like to do is basically use a widget like the one in step 4 here:
This is the utilities panel on the right of Interface Builder / XCode, where you can use various Inspector tools, e.g. 'Attributes Inspector', etc.
Does a widget like that exist in Cocoa/Interface Builder? It looks like it's somewhat based on a NSTableView, but I don't see how I'd do the grouping-based functionality using a standard NSTableView (i.e. the 'Show' button on the top-right, or the horizontal line separators between groups), and I also don't quite see how I would do the headers (which span multiple table-rows). The images on top are probably a mix between (visually) a toolbar and (practically) a tab-bar, but it looks like it's integrated in the whole.
I searched somewhat, did see this post, which refers to a non-existing project. I found copies, but they don't appear to work in latest versions of Interface Builder (I'm using XCode 6.1.1). They also appear to be pane/window-based, which is an older version of Interface Builder.
There is no one built-in control to do that. It's a combination of multiple controls, including custom views. Likewise, there are multiple ways to approach implementing it.
There may very well be a tab view to switch out the various inspectors, but, if so, it's "tabless" and the actual buttons to do the switching are customized. There's just a row of buttons and the controller switches the tab view's tab based on which is pressed. If you pick the right button style, set a template image and no title, and set their states so they act like radio buttons (only one "on" at a time), they should draw properly (the selected one will glow blue).
I think it's conceivable that the sections could be implemented using a view-based outline view. It would be a single column and the cells would be the complex views you're seeing. The section headers would be rows at the root level and the sections would be children of those rows, a level deeper in the hierarchy of the outline. Therefore, hiding and showing the sections would be achieved by collapsing and expanding the section header rows. There's even a special view identifier, NSOutlineViewShowHideButtonKey, that NSOutlineView uses to look up a Show/Hide button view from the NIB (or the delegate).
You can also implement the sections and their headers using a stack view. Apple actually has sample code for that exact thing:
InfoBarStackView.
I have one WWSD or one SDPanel with some attributes but between these attributes that are fixed inside a Table or directly in the MainTable I want put and Grid, the problem is that the Grid is not showed and when I put the grid its no more possible scroll in the WWSD or SDPanel, is like the Grid stuck the SDPanel more than the grid is not showed.
Anyone can help me to put the Grid and keep with all normally ?
Thx.
I assume you're targeting Android.
The issue is that Android does not natively support nested scrolling. Therefore, a GeneXus layout that contains a grid will disable the form's own scrolling (so that the grid can itself scroll).
There are two ways of resolving this issue:
Redesign the panel so that the form does not vertically exceed the size of the screen (thus, form scrolling is not necessary).
Set autogrow=true for the grid, which will resize to fit all items (and "push down" any other controls located below it). Since the grid will no longer need to scroll, the form's scroll will be enabled.
Apple commonly places +/- buttons below tables (NSTableView), e.g. in the System Preferences for Network or User & Groups. See image below:
How can I place identical buttons below my tables directly in Interface Builder without manipulating any interface elements in my code or subclassing any element classes?
If the table has a fixed width, the easiest way is to just use a segmented control NSSegmentedControl. First add it to your view or window:
Change its Style to Small Square, the Mode to Select None and increase the number of Segments to 4 (or keep it at 3 if you only need + and -):
The +, - and other buttons are predefined images of the AppKit framework (NSAddTemplate and NSRemoveTemplate) and directly available in Interface Builder. E.g. you could setup the first three segments as follows:
For demonstration purposes I made the - segment disabled. Unlike most other buttons, disabling a segment of a segmented control only dims the image/text, it does not change the button background. Only disabling the whole segmented control changes the background (and of course disables all segments).
Of course, the last segment should always be disabled, otherwise it would be clickable and change its background when being clicked. As it contains no image or text, it still looks the same after it has been disabled.
Switch to the size setup and uncheck the Fixed checkbox for all segments, except for the last one, make sure it is checked for the last one:
Unchecking Fixed makes the segment width dynamic, that means it will always match the minimum width required for the content.
Finally place the control directly below the table and resize it to match the table width. Here's the result:
Almost perfect, don't you think?
Things get more difficulty if the table width is dynamic (e.g. the table resizes together with the window resizing). A segmented control doesn't support autoresizing, that means you would have to programmatically change the width of its last segment each time the table is resized. Of course, that is not too hard to do and requires only little code but there is one alternative solution that requires no single line of code.
Decrease the number of segments by one and replace the last segment with a gradient button (NSButton) without title:
Its background looks exactly the same as a segmented control, yet it does support autoresizing to always match the size of the table. There is just one problem: It is clickable and this time disabling it doesn't work as this would change the background. Instead just change its Type to Momentary Change (which means the app wants to control the UI change itself when the button is clicked):
And after the button has been placed correctly and made resizable, the result looks as good as before but this time the table can be resizable and the buttons on the bottom will always fit perfectly.
Does the TableView Control in JavaFX 2 allow the insertion of new data right on the cells of the control?
I have not been able to find anything in that direction. Even the Oracle sample has separate textboxes and an ADD button outside of the control (like it was in the early 90's - yea, I've been programming for that long...)
It's not really clear what do you want to achieve.
If you mean editing table values in place you can take a look at this tutorial: http://docs.oracle.com/javafx/2.0/ui_controls/table-view.htm
If you want to add new row by action on cell you can add context menu to cells by TableView.setContextMenu(context_menu); and implement adding new row "right on the cells".