Add the navigation button(s) to the left of the grid row.
487166
public void addNavButtons()
    {
        new SCannedBox(this.getNextLocation(ScreenConstants.FIRST_SCREEN_LOCATION, ScreenConstants.SET_ANCHOR), this, null, ScreenConstants.DEFAULT_DISPLAY, null, null, MenuConstants.FORMDETAIL, MenuConstants.FORMDETAIL, null);
        super.addNavButtons();  // Next buttons will be "First!"
    }
62129
def on_left_click(self, event, grid, choices):
        
        row, col = event.GetRow(), event.GetCol()
        if col == 0 and self.grid.name != 'ages':
            default_val = self.grid.GetCellValue(row, col)
            msg = "Choose a new name for {}.\nThe new value will propagate throughout the contribution.".format(default_val)
            dia = wx.TextEntryDialog(self.grid, msg,
                                     "Rename {}".format(self.grid.name, default_val),
                                     default_val)
            res = dia.ShowModal()
            if res == wx.ID_OK:
                new_val = dia.GetValue()
                # update the contribution with new name
                self.contribution.rename_item(self.grid.name,
                                              default_val, new_val)
                # don't propagate changes if we are just assigning a new name
                # and not really renaming
                # (i.e., if a blank row was added then named)
                if default_val == '':
                    self.grid.SetCellValue(row, 0, new_val)
                    return

                # update the current grid with new name
                for row in range(self.grid.GetNumberRows()):
                    cell_value = self.grid.GetCellValue(row, 0)
                    if cell_value == default_val:
                        self.grid.SetCellValue(row, 0, new_val)
                    else:
                        continue
            return
        color = self.grid.GetCellBackgroundColour(event.GetRow(), event.GetCol())
        # allow user to cherry-pick cells for editing.
        # gets selection of meta key for mac, ctrl key for pc
        if event.ControlDown() or event.MetaDown():
            row, col = event.GetRow(), event.GetCol()
            if (row, col) not in self.dispersed_selection:
                self.dispersed_selection.append((row, col))
                self.grid.SetCellBackgroundColour(row, col, 'light blue')
            else:
                self.dispersed_selection.remove((row, col))
                self.grid.SetCellBackgroundColour(row, col, color)# 'white'
            self.grid.ForceRefresh()
            return
        if event.ShiftDown(): # allow user to highlight multiple consecutive cells in a column
            previous_col = self.grid.GetGridCursorCol()
            previous_row = self.grid.GetGridCursorRow()
            col = event.GetCol()
            row = event.GetRow()
            if col != previous_col:
                return
            else:
                if row > previous_row:
                    row_range = list(range(previous_row, row+1))
                else:
                    row_range = list(range(row, previous_row+1))
            for r in row_range:
                self.grid.SetCellBackgroundColour(r, col, 'light blue')
                self.selection.append((r, col))
            self.grid.ForceRefresh()
            return

        selection = False

        if self.dispersed_selection:
            is_dispersed = True
            selection = self.dispersed_selection

        if self.selection:
            is_dispersed = False
            selection = self.selection

        try:
            col = event.GetCol()
            row = event.GetRow()
        except AttributeError:
            row, col = selection[0][0], selection[0][1]

        self.grid.SetGridCursor(row, col)

        if col in list(choices.keys()): # column should have a pop-up menu
            menu = wx.Menu()
            two_tiered = choices[col][1]
            choices = choices[col][0]
            if not two_tiered: # menu is one tiered
                if 'CLEAR cell of all values' not in choices:
                    choices.insert(0, 'CLEAR cell of all values')
                for choice in choices:
                    if not choice:
                        choice = " " # prevents error if choice is an empty string
                    menuitem = menu.Append(wx.ID_ANY, str(choice))
                    self.window.Bind(wx.EVT_MENU, lambda event: self.on_select_menuitem(event, grid, row, col, selection), menuitem)
                self.show_menu(event, menu)
            else: # menu is two_tiered
                clear = menu.Append(-1, 'CLEAR cell of all values')
                self.window.Bind(wx.EVT_MENU, lambda event: self.on_select_menuitem(event, grid, row, col, selection), clear)
                for choice in sorted(choices.items()):
                    submenu = wx.Menu()
                    for item in choice[1]:
                        menuitem = submenu.Append(-1, str(item))
                        self.window.Bind(wx.EVT_MENU, lambda event: self.on_select_menuitem(event, grid, row, col, selection), menuitem)
                    menu.Append(-1, choice[0], submenu)
                self.show_menu(event, menu)

        if selection:
            # re-whiten the cells that were previously highlighted
            for row, col in selection:
                self.grid.SetCellBackgroundColour(row, col, self.col_color)
            self.dispersed_selection = []
            self.selection = []
            self.grid.ForceRefresh()
446385
public void layoutParts() {
    StringBuilder styleClass = new StringBuilder("group");

    // if there are no rows yet, getRowCount returns -1, in this case the next row is 0
    int nextRow = PreferencesFxUtils.getRowCount(grid) + 1;

    // Only when the preferencesGroup has a title
    if (preferencesGroup.getTitle() != null) {
      grid.add(titleLabel, 0, nextRow++, 2, 1);
      styleClass.append("-title");
      titleLabel.getStyleClass().add("group-title");
    }

    List<Field> fields = preferencesGroup.getElements().stream()
        .map(Field.class::cast)
        .collect(Collectors.toList());
    styleClass.append("-setting");

    int rowAmount = nextRow;
    for (int i = 0; i < fields.size(); i++) {
      // add to GridPane
      Field field = fields.get(i);
      SimpleControl c = (SimpleControl) field.getRenderer();
      c.setField(field);
      grid.add(c.getFieldLabel(), 0, i + rowAmount, 1, 1);
      grid.add(c.getNode(), 1, i + rowAmount, 1, 1);

      // Styling
      GridPane.setHgrow(c.getNode(), Priority.SOMETIMES);
      GridPane.setValignment(c.getNode(), VPos.CENTER);
      GridPane.setValignment(c.getFieldLabel(), VPos.CENTER);

      // additional styling for the last setting
      if (i == fields.size() - 1) {
        styleClass.append("-last");
        GridPane.setMargin(
            c.getNode(),
            new Insets(0, 0, PreferencesFxFormRenderer.SPACING * 4, 0)
        );
        GridPane.setMargin(
            c.getFieldLabel(),
            new Insets(0, 0, PreferencesFxFormRenderer.SPACING * 4, 0)
        );
      }

      c.getFieldLabel().getStyleClass().add(styleClass.toString() + "-label");
      c.getNode().getStyleClass().add(styleClass.toString() + "-node");
    }
  }
24057
function left() {
        var parentRole = getParentRole();

        if (parentRole == "tablist") {
          moveFocus(-1, getFocusElements(focusedElement.parentNode));
        } else if (focusedControl.parent().submenu) {
          cancel();
        } else {
          moveFocus(-1);
        }
      }
925178
private void adaptNavigationWidth() {
        if (frameLayout != null && navigationFragmentContainer != null && cardView != null &&
                toolbarLarge != null) {
            ViewCompat.setPaddingRelative(navigationFragmentContainer, 0, 0,
                    getDisplayWidth(this) - navigationWidth, 0);

            if (!isNavigationHidden()) {
                toolbarLarge.setNavigationWidth(navigationWidth);
                FrameLayout.LayoutParams cardViewLayoutParams =
                        (FrameLayout.LayoutParams) cardView.getLayoutParams();
                int margin = navigationWidth -
                        getResources().getDimensionPixelSize(R.dimen.card_view_intrinsic_margin);
                setMarginStart(cardViewLayoutParams, margin);
            }
        }
    }
562808
private void layoutComponents() {
		GridBagLayout layout = new GridBagLayout();
		layout.rowWeights = new double[]{1.0, 0.0, 0.0};
		layout.columnWeights = new double[]{1.0, 0.0, 0.0, 0.0, 0.0};
		layout.rowHeights = new int[] {0, 0, 0};
		layout.columnWidths = new int[] {0, 0, 0, 0, 0};
		getContentPane().setLayout(layout);

		GridBagConstraints wizardPageContainerConstraint = new GridBagConstraints();
		wizardPageContainerConstraint.gridwidth = 5;
		wizardPageContainerConstraint.fill = GridBagConstraints.BOTH;
		wizardPageContainerConstraint.gridx = 0;
		wizardPageContainerConstraint.gridy = 0;
		wizardPageContainerConstraint.insets = new Insets(5, 5, 5, 5);
		getContentPane().add(wizardPageContainer, wizardPageContainerConstraint);

		GridBagConstraints separatorConstraints = new GridBagConstraints();
		separatorConstraints.gridwidth = 5;
		separatorConstraints.fill = GridBagConstraints.HORIZONTAL;
		separatorConstraints.gridx = 0;
		separatorConstraints.gridy = 1;
		separatorConstraints.insets = new Insets(5, 5, 5, 5);
		getContentPane().add(new JSeparator(), separatorConstraints);

		GridBagConstraints cancelButtonConstraints = new GridBagConstraints();
		cancelButtonConstraints.gridx = 1;
		cancelButtonConstraints.gridy = 2;
		cancelButtonConstraints.insets = new Insets(5, 5, 5, 0);
		getContentPane().add(cancelButton, cancelButtonConstraints);

		GridBagConstraints previousButtonConstraints = new GridBagConstraints();
		previousButtonConstraints.gridx = 2;
		previousButtonConstraints.gridy = 2;
		previousButtonConstraints.insets = new Insets(5, 5, 5, 0);
		getContentPane().add(previousButton, previousButtonConstraints);

		GridBagConstraints nextButtonConstraints = new GridBagConstraints();
		nextButtonConstraints.gridx = 3;
		nextButtonConstraints.gridy = 2;
		nextButtonConstraints.insets = new Insets(5, 5, 5, 0);
		getContentPane().add(nextButton, nextButtonConstraints);

		GridBagConstraints finishButtonConstraints = new GridBagConstraints();
		finishButtonConstraints.gridx = 4;
		finishButtonConstraints.gridy = 2;
		finishButtonConstraints.insets = new Insets(5, 5, 5, 5);
		getContentPane().add(finishButton, finishButtonConstraints);
	}
440892
def _layout(self):
        """"""

        self.EnableGridLines(False)

        # Standard row and col sizes for zooming
        default_cell_attributes = \
            self.code_array.cell_attributes.default_cell_attributes

        self.std_row_size = default_cell_attributes["row-height"]
        self.std_col_size = default_cell_attributes["column-width"]

        self.SetDefaultRowSize(self.std_row_size)
        self.SetDefaultColSize(self.std_col_size)

        # Standard row and col label sizes for zooming
        self.col_label_size = self.GetColLabelSize()
        self.row_label_size = self.GetRowLabelSize()

        self.SetRowMinimalAcceptableHeight(1)
        self.SetColMinimalAcceptableWidth(1)

        self.SetCellHighlightPenWidth(0)
1249181
def on_left_click(self, event, grid, choices):
        
        color = self.grid.GetCellBackgroundColour(event.GetRow(), event.GetCol())
        # allow user to cherry-pick cells for editing.  gets selection of meta key for mac, ctrl key for pc
        if event.ControlDown() or event.MetaDown():
            row, col = event.GetRow(), event.GetCol()
            if (row, col) not in self.dispersed_selection:
                self.dispersed_selection.append((row, col))
                self.grid.SetCellBackgroundColour(row, col, 'light blue')
            else:
                self.dispersed_selection.remove((row, col))
                self.grid.SetCellBackgroundColour(row, col, color)# 'white'
            self.grid.ForceRefresh()
            return
        if event.ShiftDown(): # allow user to highlight multiple consecutive cells in a column
            previous_col = self.grid.GetGridCursorCol()
            previous_row = self.grid.GetGridCursorRow()
            col = event.GetCol()
            row = event.GetRow()
            if col != previous_col:
                return
            else:
                if row > previous_row:
                    row_range = list(range(previous_row, row+1))
                else:
                    row_range = list(range(row, previous_row+1))
            for r in row_range:
                self.grid.SetCellBackgroundColour(r, col, 'light blue')
                self.selection.append((r, col))
            self.grid.ForceRefresh()
            return

        selection = False

        if self.dispersed_selection:
            is_dispersed = True
            selection = self.dispersed_selection

        if self.selection:
            is_dispersed = False
            selection = self.selection

        try:
            col = event.GetCol()
            row = event.GetRow()
        except AttributeError:
            row, col = selection[0][0], selection[0][1]

        self.grid.SetGridCursor(row, col)

        if col in list(choices.keys()): # column should have a pop-up menu
            menu = wx.Menu()
            two_tiered = choices[col][1]
            choices = choices[col][0]
            if not two_tiered: # menu is one tiered
                if 'CLEAR cell of all values' not in choices:
                    choices.insert(0, 'CLEAR cell of all values')
                for choice in choices:
                    if not choice:
                        choice = " " # prevents error if choice is an empty string
                    menuitem = menu.Append(wx.ID_ANY, str(choice))
                    self.window.Bind(wx.EVT_MENU, lambda event: self.on_select_menuitem(event, grid, row, col, selection), menuitem)
                self.show_menu(event, menu)
            else: # menu is two_tiered
                clear = menu.Append(-1, 'CLEAR cell of all values')
                self.window.Bind(wx.EVT_MENU, lambda event: self.on_select_menuitem(event, grid, row, col, selection), clear)
                for choice in sorted(choices.items()):
                    submenu = wx.Menu()
                    for item in choice[1]:
                        menuitem = submenu.Append(-1, str(item))
                        self.window.Bind(wx.EVT_MENU, lambda event: self.on_select_menuitem(event, grid, row, col, selection), menuitem)
                    menu.Append(-1, choice[0], submenu)
                self.show_menu(event, menu)

        if selection:
            # re-whiten the cells that were previously highlighted
            for row, col in selection:
                self.grid.SetCellBackgroundColour(row, col, self.col_color)
            self.dispersed_selection = []
            self.selection = []
            self.grid.ForceRefresh()
1317281
public void moveUp(I_CmsEditableGroupRow row) {

        int index = m_container.getComponentIndex(row);
        if (index > 0) {
            m_container.removeComponent(row);
            m_container.addComponent(row, index - 1);
        }
        updateButtonBars();
    }
181303
private void updateButtonsLayout() {
		// Get the buttons layout.
		LinearLayout root = this.chooser.getRootLayout();
		LinearLayout buttonsLayout = (LinearLayout) root.findViewById(R.id.linearLayoutButtons);

		// Verify if the 'Add' button is visible or not.
		View addButton = root.findViewById(R.id.buttonAdd);
		addButton.setVisibility(this.canCreateFiles? View.VISIBLE : View.INVISIBLE);
		addButton.getLayoutParams().width = this.canCreateFiles? ViewGroup.LayoutParams.MATCH_PARENT : 0;

		// Verify if the 'Ok' button is visible or not.
		View okButton = root.findViewById(R.id.buttonOk);
		okButton.setVisibility(this.folderMode? View.VISIBLE : View.INVISIBLE);
		okButton.getLayoutParams().width = this.folderMode? ViewGroup.LayoutParams.MATCH_PARENT : 0;
		
		// If both buttons are invisible, hide the layout.
		ViewGroup.LayoutParams params = buttonsLayout.getLayoutParams();
		if(this.canCreateFiles || this.folderMode) {
			// Show the layout.
			params.height = ViewGroup.LayoutParams.WRAP_CONTENT;

			// If only the 'Ok' button is visible, put him first. Otherwise, put 'Add' first.
			buttonsLayout.removeAllViews();
			if(this.folderMode && !this.canCreateFiles) {
				buttonsLayout.addView(okButton);
				buttonsLayout.addView(addButton);
			} else {
				buttonsLayout.addView(addButton);			
				buttonsLayout.addView(okButton);
			}
		} else {
			// Hide the layout.
			params.height = 0;
		}
	}
660140
async def add(ctx, left: int, right: int):
    """"""
    await ctx.send(left + right)
643564
public void addButtonRight(Component button) {

        if (m_buttonsFolded && !isAlwaysShow(button)) {
            m_rightButtons.addComponent(button);
        } else {
            int dropDownIndex = m_itemsRight.getComponentIndex(m_userDropDown);
            if (dropDownIndex >= 0) {
                m_itemsRight.addComponent(button, dropDownIndex);
            } else {
                m_itemsRight.addComponent(button);
            }
        }
        updateFoldingThreshhold();
    }
335175
private void updateNavigationPreferences() {
        List<NavigationPreference> oldNavigationPreferences =
                new ArrayList<>(navigationPreferences);
        navigationPreferences.clear();
        boolean selectedNavigationPreferenceFound = selectedNavigationPreference == null;

        for (int i = 0; i < getItemCount(); i++) {
            Preference item = getItem(i);

            if (item instanceof NavigationPreference) {
                NavigationPreference navigationPreference = (NavigationPreference) item;
                navigationPreferences.add(navigationPreference);

                if (selectedNavigationPreference == navigationPreference) {
                    selectedNavigationPreferenceFound = true;
                }

                if (!oldNavigationPreferences.contains(navigationPreference)) {
                    notifyOnNavigationPreferenceAdded(navigationPreference);
                    oldNavigationPreferences.remove(navigationPreference);
                }
            }
        }

        for (NavigationPreference removedNavigationPreference : oldNavigationPreferences) {
            notifyOnNavigationPreferenceRemoved(removedNavigationPreference);
        }

        if (!selectedNavigationPreferenceFound) {
            if (getNavigationPreferenceCount() > 0) {
                selectNavigationPreference(Math.min(selectedNavigationPreferenceIndex,
                        getNavigationPreferenceCount() - 1), null);
            } else {
                selectNavigationPreference(null, null);
            }
        }
    }
806727
protected void repositionButtons() {

        for (Map.Entry<String, CmsDirectEditButtons> entry : m_directEditButtons.entrySet()) {
            CmsDirectEditButtons buttons = entry.getValue();
            Element tag = buttons.getMarkerTag();
            CmsPositionBean newPos = CmsDomUtil.getEditablePosition(tag);
            m_positions.put(tag.getId(), newPos);
        }
        CmsEditablePositionCalculator posCalc = new CmsEditablePositionCalculator(m_positions);
        m_buttonPositions = posCalc.calculatePositions();
        for (CmsDirectEditButtons buttons : m_directEditButtons.values()) {
            String id = buttons.getMarkerTag().getId();
            buttons.setPosition(
                m_positions.get(id),
                m_buttonPositions.get(id),
                buttons.getMarkerTag().getParentElement());
        }

    }
93038
private void updateNavPos(CmsResource res, CmsSitemapChange change) throws CmsException {

        if (change.hasChangedPosition()) {
            applyNavigationChanges(change, res);
        }
    }
743061
def right_to_left(self):
        """"""
        self._entry_mode &= ~Command.MODE_INCREMENT
        self.command(self._entry_mode)
976880
public void addNavButtons()
    {
        new SCannedBox(this.getNextLocation(ScreenConstants.FIRST_SCREEN_LOCATION, ScreenConstants.SET_ANCHOR), this, null, ScreenConstants.DEFAULT_DISPLAY, null, null, JCalendarPopup.CALENDAR_ICON, ProjectTask.PROJECT_TASK_CALENDAR_SCREEN, ProjectTask.PROJECT_TASK_CALENDAR_SCREEN);
        new SCannedBox(this.getNextLocation(ScreenConstants.FIRST_SCREEN_LOCATION, ScreenConstants.SET_ANCHOR), this, null, ScreenConstants.DEFAULT_DISPLAY, null, null, MenuConstants.FORMDETAIL, ProjectTask.PROJECT_PREDECESSOR_DETAIL_SCREEN, ProjectTask.PROJECT_PREDECESSOR_DETAIL_SCREEN);
        super.addNavButtons();
    }