Delphi TListBox iOS制作新的itemstyle/行为 [英] Delphi TListBox iOS making new itemstyle/behavior

查看:103
本文介绍了Delphi TListBox iOS制作新的itemstyle/行为的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要显示自定义数据.对于示例,我需要显示一个包含姓名,描述和照片的联系人列表.理想情况下,我还要在此处显示自定义数据,例如发起电话呼叫的按钮.默认样式不能完全满足我的要求,但是相当接近.

I need to show custom data. For example I need to show a contact list with name, description, photo. And ideally I would also like to show custom data there, e.g. a button to launch telephone call. The default styles do not quite do what I want, but fairly close.

据我所知,如果我可以创建自定义样式,TListBox可能是一个不错的控件?那可能吗? (当然,另一个问题是设置自定义数据控件的值.)

Thus, as far as I can tell, TListBox could be a decent control for this if I could create custom styles? Is that possible? (Anotther problem of course is setting the values of the custom data controls.)

推荐答案

您应该仔细看一下FMX CustomListBox示例AFAIK,即使该示例似乎已经完全满足您的需要,并且已经就位.

You should take a good look at the FMX CustomListBox example AFAIK even the example alone already seems to have exactly what you need, already set in place.

我花了大约10分钟的时间,才直接在CustomListBox示例中显示出您的描述:

It took me about 10 minutes to produce this result straight out of the CustomListBox example with your description:

随附的FMX示例完美演示的一件事是,通过 HitTest 再次在FMX Delphi示例中进行了非常详细的介绍.

One thing that the included FMX example demonstrates perfectly is how easy it is to add any FMX control to the ListBox via the TStyleBook Layouts such as buttons, images etc... basically any visual control upon which you then implement the HitTest, again, all very detailed in the FMX Delphi example.

这篇关于Delphi TListBox iOS制作新的itemstyle/行为的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆