On Saturday 09 April 2016 00:18:52 Krzysztof wrote:
> Hi Martin,
>
> I mentioned about this in topic "Migration from Lazarus". You respond:
> > TTreeItemEdit placed in a TWidgetGrid. TWidgedGrid (component palette
> > tab 'Edit') is a grid widget where inserted edit widgets build data
> > columns. That means it is possible to combine a TreeItemEdit column with
> > a text-, a datatime, an image and a button column for example. The
> > inserted widgets with all their properties and events are fully working.
> > Examples of TTreeItemEdit are here:
> > https://gitlab.com/mseide-msegui/mseuniverse/tree/master/attic/msedocumen
> >ting/mse/trunk/help/tutorials/widgets/treeview For flat data items there
> > is TItemEdit (also placed in a TWidgetGrid). There is also TListView (tab
> > 'Widget') for a flat list of items showed in a rectangular area.
>
> I would like to continue this topic here. I need simple LCL readonly
> and flat listview so I'm interested in TListView instead of other
> controls. I'm looking at it and can't find anything which catch my
> attention. Let say that I have FPC TList which contain items:
>
> PMyItem = ^TMyItem;
> TMyItem = record
>   Name: String;
>   Age: Integer;
>   Country: String;
> end;
>
> And now I want to show this list. Notice that I'm not interested in
> doubled data (even 1 million records in TList).

TListView (and TItemEdit which can be used as data column in a TWidgetGrid) 
use TCustomItemList descendants which store instance pointers to TlistItem 
descendants, please see lib/common/editwidgets/msedatanodes.pas and 
lib/common/editwidgets/mselistbrowser.pas.
1 million items is no problem.
If you can use a TListItem descendant in order to store your data there will 
be no doubled data. TListItem has an Index property which could be used in 
order to get the actual data in a TListItem descendant.
For trees there is also TTreeNode as simplified data container.

Martin

------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial! http://pubads.g.doubleclick.net/
gampad/clk?id=1444514301&iu=/ca-pub-7940484522588532
_______________________________________________
mseide-msegui-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk

Reply via email to