Class

# DesktopTableRowAction

<div class="rst-class">

forsearch

</div>

Table Row Action, Swipe

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

## Description

One action a user can invoke by swiping a row of a `DesktopTable</api/user_interface/desktop/desktoptable>` horizontally.

Actions are supplied per row through `DesktopTable.ApplyLeadingActionsForRow<desktoptable.applyleadingactionsforrow>` and `DesktopTable.ApplyTrailingActionsForRow<desktoptable.applytrailingactionsforrow>`. Both events are raised once, at the moment the gesture is recognised, never while drawing. When the user picks an action, `DesktopTable.RowActionSelected<desktoptable.rowactionselected>` fires with the row and the action object.

The gesture is a two-finger swipe on a trackpad (macOS), a precision touchpad (Windows) or a touchpad (Linux). Touchscreens are not supported.

## Properties

<div class="rst-class">

table-centered_columns_3_and_4

</div>

| Name                                                     | Type                                   | Read-Only | Shared |
|----------------------------------------------------------|----------------------------------------|-----------|--------|
| `BackgroundColor<desktoptablerowaction.backgroundcolor>` | `ColorGroup</api/graphics/colorgroup>` |           |        |
| `Image<desktoptablerowaction.image>`                     | `Picture</api/graphics/picture>`       |           |        |
| `Symbol<desktoptablerowaction.symbol>`                   | `String</api/data_types/string>`       |           |        |
| `Tag<desktoptablerowaction.tag>`                         | `Variant</api/data_types/variant>`     |           |        |
| `Title<desktoptablerowaction.title>`                     | `String</api/data_types/string>`       |           |        |

## Methods

<div class="rst-class">

table-centered_column_4

</div>

| Name                                             | Parameters                                                                                                      | Returns | Shared |
|--------------------------------------------------|-----------------------------------------------------------------------------------------------------------------|---------|--------|
| `Constructor<desktoptablerowaction.constructor>` | title As `String</api/data_types/string>`, tag As `Variant</api/data_types/variant>` = `Nil</api/language/nil>` |         |        |

## Property descriptions

<div id="desktoptablerowaction.backgroundcolor">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopTableRowAction.BackgroundColor

**BackgroundColor** As `ColorGroup</api/graphics/colorgroup>`

> Button fill. Unset (`Nil</api/language/nil>`) uses a neutral default. A `ColorGroup</api/graphics/colorgroup>` lets a destructive action be a strong red in light mode and a darker one in dark mode.
>
> ``` xojo
> Var remove As New DesktopTableRowAction("Delete", "delete")
> remove.BackgroundColor = New ColorGroup(&cD93025, &cC5372C)
> ```

<div id="desktoptablerowaction.image">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopTableRowAction.Image

**Image** As `Picture</api/graphics/picture>`

> Centred in the button, `Title` centred below it. The picture's scale factor is respected, so a HiDPI image is drawn at its point size.
>
> This example sets the centred in the button, Title centred below it:
>
> ``` xojo
> action.Image = myPicture
> ```

<div id="desktoptablerowaction.symbol">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopTableRowAction.Symbol

**Symbol** As `String</api/data_types/string>`

> Name of a system image. Assigning it replaces an existing `Image` set before; an `Image` set afterwards wins. Assigning `""` removes only the picture `Symbol` created; an `Image` assigned directly stays. Names are platform specific (SF Symbols on macOS).
>
> The list of supported symbols can be found here:
>
> - **macOS**: <https://developer.apple.com/design/human-interface-guidelines/sf-symbols>
> - **Windows**: <https://learn.microsoft.com/en-us/windows/apps/design/iconography/segoe-ui-symbol-font> (Windows 10+), <https://learn.microsoft.com/en-us/windows/apps/design/iconography/segoe-fluent-icons-font> (Windows 11+)
> - **Linux:** <https://specifications.freedesktop.org/icon-naming>
>
> <div class="important">
>
> <div class="title">
>
> Important
>
> </div>
>
> On Windows, this property is currently only supported for WinUI.
>
> </div>
>
> This example sets the name of a system image:
>
> ``` xojo
> #If TargetMacOS  
>   action.Symbol = "square.and.arrow.up"
> #EndIf
> ```

<div id="desktoptablerowaction.tag">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopTableRowAction.Tag

**Tag** As `Variant</api/data_types/variant>`

> Free identifier; `RowActionSelected` hands back the whole action, so it need not be unique. It is the value `RowActionSelected<desktoptable.rowactionselected>` hands back together with the action itself.
>
> This example sets the free identifier; RowActionSelected hands back the whole action, so it need not be unique:
>
> ``` xojo
> action.Tag = "myTag"
> ```

<div id="desktoptablerowaction.title">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopTableRowAction.Title

**Title** As `String</api/data_types/string>`

> Button caption. Caption shown on the action's button. It is what the button shows, below the picture when an `Image<desktoptablerowaction.image>` is set.
>
> This example sets the button caption:
>
> ``` xojo
> action.Title = "Title"
> ```

## Method descriptions

<div id="desktoptablerowaction.constructor">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopTableRowAction.Constructor

**Constructor**(title As `String</api/data_types/string>`, tag As `Variant</api/data_types/variant>` = `Nil</api/language/nil>`)

> Caption plus the identifier `RowActionSelected` hands back. Everything else - colour, picture, symbol - is set on the object afterwards.
>
> This example creates an action with a caption and the tag it reports back:
>
> ``` xojo
> action.Constructor("title")
> ```

## Compatibility

|                       |         |
|-----------------------|---------|
| **Project Types**     | Desktop |
| **Operating Systems** | All     |

<div class="seealso">

`DesktopTable</api/user_interface/desktop/desktoptable>`

</div>
