# List box when displayed event

**URL:** <https://forum.xojo.com/t/list-box-when-displayed-event/88648>\
**Category:** Getting Started\
**Created:** [July 22, 2026, 8:40pm UTC](https://forum.xojo.com/t/list-box-when-displayed-event/88648 "2026-07-22T20:40:59Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![Anthony\_G\_Cyphers](https://forum.xojo.com/user_avatar/forum.xojo.com/anthony_g_cyphers/32/16862_2.png) [@Anthony\_G\_Cyphers](https://forum.xojo.com/u/Anthony_G_Cyphers)\
**Post date:** [July 22, 2026, 9:32pm UTC](https://forum.xojo.com/t/list-box-when-displayed-event/88648/4 "2026-07-22T21:32:25Z")

</div>

You can add a RowTag for the row you’re currently performing an action on, something like

```auto
myList.AddRow( "Cell 1", "Cell 2", "Cell 2" )
myList.RowTagAt( myList.LastAddedRowIndex ) = True

```

Then, in myList’s PaintCellBackground event:

```auto
If row < 0 or row > me.LastRowIndex then Return

If me.RowTagAt( row ) = True Then
  g.DrawingColor = &cFF00FF
  g.FillRectangle( 0, 0, g.Width, g.Height )
  Return True
End If

```

And, finally, at the end of your process that loads your data, you can set that row’s tag to False to display the default colors.

---

_[View the full topic](https://forum.xojo.com/t/list-box-when-displayed-event/88648)._
