Browse Source

Accessibility: Fall back to RowComponent AccessibilityHandler if no custom cell component handler has been set in TableListBox

v6.1.6
ed 4 years ago
parent
commit
3321ff231d
1 changed files with 9 additions and 3 deletions
  1. +9
    -3
      modules/juce_gui_basics/widgets/juce_TableListBox.cpp

+ 9
- 3
modules/juce_gui_basics/widgets/juce_TableListBox.cpp View File

@@ -569,9 +569,15 @@ std::unique_ptr<AccessibilityHandler> TableListBox::createAccessibilityHandler()
const AccessibilityHandler* getCellHandler (int row, int column) const override
{
if (isPositiveAndBelow (row, getNumRows()) && isPositiveAndBelow (column, getNumColumns()))
if (auto* cellComponent = tableListBox.getCellComponent (tableListBox.getHeader().getColumnIdOfIndex (column, false), row))
return cellComponent->getAccessibilityHandler();
if (isPositiveAndBelow (row, getNumRows()))
{
if (isPositiveAndBelow (column, getNumColumns()))
if (auto* cellComponent = tableListBox.getCellComponent (tableListBox.getHeader().getColumnIdOfIndex (column, false), row))
return cellComponent->getAccessibilityHandler();
if (auto* rowComp = tableListBox.getComponentForRowNumber (row))
return rowComp->getAccessibilityHandler();
}
return nullptr;
}


Loading…
Cancel
Save