I custom my list box with flowing code, with column id =5 is button
and when listbox shows first time,the button not show.
click one row and the buttons shows.and click another row, buttons will disappear
is there any thing wrong?
Component* refreshComponentForCell(int rowNumber, int columnId, bool
/isRowSelected/,
Component* existingComponentToUpdate) override
{
//jassert(existingComponentToUpdate == nullptr);
// The other columns are editable text columns, for which we use the custom
Label componentif (columnId == 5) { auto btaction = static_cast<TextButton*>(existingComponentToUpdate); if (rowNumber < vec.size()) { if (!btaction){ btaction = new TextButton(TRANS("Modify")); btaction->onClick = ([this,rowNumber] { })); }); btaction->setVisible(true); } else { delete existingComponentToUpdate; btaction = nullptr; } return btaction; } } else { auto* textLabel = static_cast<Label*> (existingComponentToUpdate); if (textLabel != nullptr) { return textLabel; }
}
> return nullptr; // [10]
}