| 628 | } |
| 629 | |
| 630 | void PluginDataViewCtrl::SetFocus() |
| 631 | { |
| 632 | if(!GetCurrentItem().IsOk()) |
| 633 | { |
| 634 | wxDataViewItemArray sel; |
| 635 | sel.push_back(GetItemByRow(0)); |
| 636 | if(sel[0].IsOk()) |
| 637 | { |
| 638 | SetCurrentItem(sel[0]); |
| 639 | SetSelections(sel); |
| 640 | } |
| 641 | } |
| 642 | wxDataViewCtrl::SetFocus(); |
| 643 | #if wxUSE_ACCESSIBILITY |
| 644 | if(GetCurrentItem().IsOk()) |
| 645 | { |
| 646 | wxAccessible::NotifyEvent( |
| 647 | wxACC_EVENT_OBJECT_FOCUS, |
| 648 | this, |
| 649 | wxOBJID_CLIENT, |
| 650 | GetRowByItem(GetCurrentItem()) + 1 |
| 651 | ); |
| 652 | wxAccessible::NotifyEvent( |
| 653 | wxACC_EVENT_OBJECT_SELECTIONWITHIN, |
| 654 | this, |
| 655 | wxOBJID_CLIENT, |
| 656 | wxACC_SELF |
| 657 | ); |
| 658 | } |
| 659 | #endif |
| 660 | } |
| 661 | #endif |
| 662 |
no test coverage detected