SetItemHighlighted gives me the light grey color too. I am trying to get the yellow background color that appears when pressing with the mouse.
Any help is appreciated.
When you create widget for row, you can set style:
TSharedRef<ITableRow> SYourWidget::OnGenerateRowForList(TSharedPtr<YourItemClass> Item, const TSharedRef<STableViewBase>& OwnerTable)
{
// not the best place for it, just for example ;)
static auto CustomStyle = FCoreStyle::Get().GetWidgetStyle<FTableRowStyle>("TableView.Row");
static auto const GreenHighlightBrush = FSlateColorBrush(FLinearColor(0.427, 0.701, 0.003));
CustomStyle.SetActiveBrush(GreenHightlightBrush); // selected but not hovered
CustomStyle.SetActiveHoveredBrush(GreenHighlightBrush); // selected and hovered
return SNew(STableRow< TSharedPtr<YourItemClass> >, OwnerTable)
.Padding(2.0f)
.Style(&CustomStyle)
/* content */ ];
}