Setting Widget Size and Position¶
withPosition to set the size and position of the widget in the tab.
withSize sets the number of columns wide and rows high the widget should be. For example, calling
withSize(1, 1) makes the widget occupy a single cell in the grid. Note that some widgets have a minimum size that may be greater than the specified size, in which case the widget will use the smallest supported size.
withPosition sets the row and column of the top-left corner of the widget. Rows and columns are both 0-indexed, so the topmost row is number 0 and the leftmost column is also number 0. If the position of any widget in a tab is specified, every widget should also have its position set to avoid overlapping widgets.
Adding Widgets to Layouts¶
If there are many widgets in a tab with related data, it can be useful to place them into smaller subgroups instead of loose in the tab. Much like how the handle to a tab is retrieved with
Shuffleboard.getTab, a layout inside a tab (or even in another layout) can be retrieved with