Table Row Selection (don't show)

I’m sure I saw this here before but I can’t find it now.
How do you prevent a table row cell from showing that it’s selected?

Hi Chris, I’m interested to know why you want to show your users that a list row is selected by not showing them visually. Or do you mean the highlight when editing a cell value?

Override cellbackgroundpaint: from the reference

Returns a [Boolean](file:///Boolean). [True](file:///True) means the user has handled the background paint and no other processing is to be done with the background. In this case the user is responsible for all highlighting. [False](file:///False) means the user wants the default background; this will overwrite your drawing on the row that needs to be highlighted as the row or column will be highlighted as appropriate (according to the platform and the hierarchical style).

I’m looking to not have the cell highlighted.
I have controls in it, so it looks goofy if it’s also highlighted.

That’s for a desktop app.

oops… reading too fast! Thanks.

Deselect it when it’s selected?

Not sure if it’s possible:
https://documentation.xojo.com/api/ios/iosmobiletable.html#iosmobiletable-selectrow

Maybe:

Table.SelectRow(-1, -1) 

Untested.

Or create custom cells then set anything as you want.

@DerkJ I think the point was to have the row cell selected but not highlighted.

With iOSDesignExtensions you can use

cell.SetSelectionStyleXC(TableExtensionsXC.selectionStyle.none)

That’s it!
I was even using it before.

Thank you very much.

1 Like

Do you plan on updating that for API 2?

I’m updating it as I go, and am happy to share it back.

Yes I will update it for API2 very soon. I’m just too busy at the moment with two urgent projects.

Maybe we can crowd-source the updates and send them back to you.
I think more than a few people have appreciated your contributions.