# Listbox: detect selection of non editable cell by arrow keys, not by click

**URL:** <https://forum.xojo.com/t/listbox-detect-selection-of-non-editable-cell-by-arrow-keys-not-by-click/52274>\
**Category:** Getting Started\
**Created:** [February 4, 2020, 9:53pm UTC](https://forum.xojo.com/t/listbox-detect-selection-of-non-editable-cell-by-arrow-keys-not-by-click/52274 "2020-02-04T21:53:04Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Oliver\_Janz](https://forum.xojo.com/letter_avatar_proxy/v4/letter/o/5fc32e/32.png) [@Oliver\_Janz](https://forum.xojo.com/u/Oliver_Janz)\
**Post date:** [February 4, 2020, 9:53pm UTC](https://forum.xojo.com/t/listbox-detect-selection-of-non-editable-cell-by-arrow-keys-not-by-click/52274/1 "2020-02-04T21:53:04Z")

</div>

Hi, I’m struggeling with the the list box.

The Problem:

- The CellGotFocus Event does fire only when editable cells get the focus
- The CellClick event does only fire when I click on a cell  
But how do I detect if a non editable cell gets the focus without clicking on it? For example by using the arrow keys up and down?

Thanks for any Help

Oliver

---

<div class="post-metadata">

**Author:** ![Emile\_Schwarz](https://forum.xojo.com/letter_avatar_proxy/v4/letter/e/90ced4/32.png) [@Emile\_Schwarz](https://forum.xojo.com/u/Emile_Schwarz)\
**Post date:** [February 5, 2020, 3:48am UTC](https://forum.xojo.com/t/listbox-detect-selection-of-non-editable-cell-by-arrow-keys-not-by-click/52274/2 "2020-02-05T03:48:10Z")

</div>

KeyDown Event / Chr(9) for Tab will help you.

Not knowing what you want to do do not allow many guesses on what you need.

Look at the ListBox bottom examples (LR) cor coor change.

---

<div class="post-metadata">

**Author:** ![Oliver\_Janz](https://forum.xojo.com/letter_avatar_proxy/v4/letter/o/5fc32e/32.png) [@Oliver\_Janz](https://forum.xojo.com/u/Oliver_Janz)\
**Post date:** [February 5, 2020, 5:09pm UTC](https://forum.xojo.com/t/listbox-detect-selection-of-non-editable-cell-by-arrow-keys-not-by-click/52274/3 "2020-02-05T17:09:47Z")

</div>

Thanks, I managed it by using ListBox1.SelectedRowIndex within the KeyUp-Event.

---

<div class="post-metadata">

**Author:** ![Tim\_Parnell](https://forum.xojo.com/user_avatar/forum.xojo.com/tim_parnell/32/161_2.png) [@Tim\_Parnell](https://forum.xojo.com/u/Tim_Parnell)\
**Post date:** [February 5, 2020, 5:11pm UTC](https://forum.xojo.com/t/listbox-detect-selection-of-non-editable-cell-by-arrow-keys-not-by-click/52274/4 "2020-02-05T17:11:40Z")

</div>

[https://documentation.xojo.com/api/deprecated/listbox.html#listbox-change](https://documentation.xojo.com/api/deprecated/listbox.html#listbox-change)

---

<div class="post-metadata">

**Author:** ![system](https://forum.xojo.com/uploads/default/original/1X/455b4dcc0e61630e9f81940004ddffa49c432a46.png) [@system](https://forum.xojo.com/u/system)\
**Post date:** [April 29, 2021, 4:16pm UTC](https://forum.xojo.com/t/listbox-detect-selection-of-non-editable-cell-by-arrow-keys-not-by-click/52274/5 "2021-04-29T16:16:45Z")

</div>


