本文介绍了在RAD Studio在10西雅图,性能和QUOT;。文本"和" .Detail"我的列表视图带有下划线为错误。我该如何解决这个问题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚才下载的RAD Studio 10西雅图和打开,我在公司的RAD Studio XE8制定一个方案。在XE8,我的程序绝对没有错误。然而,当我在10西雅图打开程序并试图运行它,它给了我60错误。我看了看我的code和listview.items.item []。文本和listview.items.item []。详细的所有实例都下划线。
当我看着listview.items.item [],的.text和.detail的可能性能都没有了。解决这个问题你怎么解决/获取?

在此先感谢,乔治。


解决方案

FireMonkey的的组件及其相关的类都发生在西雅图一个广泛的重构。这是在案英巴卡迪诺的DocWiki:

最新消息|列表视图控件的重构

The refactoring page does not mention the Text and Detail properties specifically. However, other pages of the DocWiki provide the missing clue:

What's New | Other FireMonkey Changes

FMX.ListView.TListViewBase.Selected

The TListView.Selected property still returns a FMX.ListView.Types.TListItem as before. However, TListItem no longer has its own Detail and Text properties. They have been moved to the FMX.ListView.Appearances.TListViewItem class, which derives from TListItem.

TListView still derives from FMX.ListView.TCustomListView as before, but now TCustomListView derives from a new set of base classes that did not exist in XE8:

XE8:

FMX.Controls.TStyledControl

FMX.ListView.TCustomListView

FMX.ListView.TListView

Seattle:

FMX.Controls.TStyledControl

FMX.ListView.TAdapterListView

FMX.ListView.TListViewBase

FMX.ListView.TPresentedListView

FMX.ListView.TAppearanceListView

FMX.ListView.TCustomListView

FMX.ListView.TListView

So it stands to reason that all list item objects in TListView are now instances of the FMX.ListView.Appearances.TAppearanceListViewItem class, which derives from TListViewItem.

As such, you have to type-cast accordingly when accessing any property that has moved from TListItem to TListViewItem, which includes the Detail and Text properties, amongst others.

这篇关于在RAD Studio在10西雅图,性能和QUOT;。文本"和" .Detail"我的列表视图带有下划线为错误。我该如何解决这个问题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-27 13:42