delphi - Grouping items inside TListView object? -
I am trying to group items within the TListView object, but I find the class responsible for grouping the object I can not, neither am I able to do this within the document.
- What is the class about grouping items within the TListView object, and how to use it properly?
Platform FireMonkey (Android / iOS) / Delphi X6
This property I believe is you talking about TListGroups
, is a collection in which TListGroup
items are provided in the Delphi document < / P>
Unfortunately, this is not only available in VCL and is not FMX, because the built-in functionality is a part of the Windows List View Control which can be found in the The closest you can get in FMX is using This creates an image (indicated from the dockwiki) TListView Wrapped.
TListBox
and a TListBoxGroupHeader
which is included in the Multi-Device Tutorial A table view (Using ListBox component to display iOS and Android)) :
Process TForm1.FormCreate (Sender: Toubys); Var c: Four; I: integer; Buffer: string; Listbox item: TLITboxime; ListBoxGroupHeader: TListBoxGroupHeader; Start ListBox1.BegginUpdate; For C: = 'A' starts with 'Z' // Add 'Headset' ('A' to 'Z') in the list list box group header: = TListBoxGroupHeader.Create (ListBox1); ListBoxGroupHeader.Text: = UpperCase (C); ListBox1.AddObject (ListBoxGroupHeader); // I: Add items to the list from 1 to 3 ('A', 'A', 'AA', 'B', 'BB', 'BBB', 'C', ...) / Repeat StringOfChar Returns a string with a specified number of characters going. Buffer: = stringoff (c, i); // Just add items // ListBox1.Items.Add (buffer); // Or, you can automatically add items by ListLoxItem by creating an example of TListBoxItem: = TListBoxItem.Create (ListBox1); ListBoxItem.Text: = buffer; // (aNone = 0, a = 1, a decree = 2, aCheckmark = 3) ListBoxItem.ItemData.Accessory: = TListBoxItemData.TAccessory (i); ListBox1.AddObject (ListBoxItem); End; End; ListBox1.EndUpdate; End;
Comments
Post a Comment