I expected that method SelectAll would select all cards within TAdvCardList, but it's selecting only Visible and filtered cards.
Line 6606 in AdvCardList.pas:
if FCards.Items[CardN].Filtered and FCards.Items[CardN].Visible then
After user plays with resizing cardlist columns, form, or cardlist container, I've been getting almost random results on item selection after calling
.SelectAll , and after checking my program many times, then I looked into
.SelectAll code and noticed it was not selecting all cards at all.
Shouldn't SelectAll select ALL cards, and some other SelectAllVisible method select cards according to visibility ? Or maybe an optional
SelectInvisibleCards parameter of
SelectAll that would default to
This is by design, because it is expected that the list of selected cards matches with what the user sees as selected cards on the screen.
I'm not sure what the specific purpose is for setting a card in a selected state when it is not visible. Then to get the selected cards after calling SelectAll is identical to just get the entire list of cards.
Regardless, if this is useful for you, we have added a default false parameter to SelectAll and when you set it to true, it will include filtered and not visible items. This small extension will be included in the next update.
Because the user can play with scrolling and resizing before he clicks the option that will select all and do something. This was making some cards invisible, but they should be processed. Maybe the parameter should let one include the invisible ones, and not the filtered ones. I understand that one could use the Visible property to hide some cards that should not be selected (in fact, this way it is a filter), but there are cards that will be invisible just because they don't fit in card list's dimensions at a certain moment.
I agree that there would be no purpose to make them selected when filtered, unless in some weird very very specific situation.
This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.
The Visible property has no relation with the card being within the client rect of the TAdvCardList or not. The Visible property is set at application level to control visibility in general of the card and is at no time controlled internally by TAdvCardList.