Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/delphi/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Delphi 如何LiveBind具有自定义样式的Firemonkey TListbox?_Delphi_Firemonkey_Delphi Xe5_Livebindings - Fatal编程技术网

Delphi 如何LiveBind具有自定义样式的Firemonkey TListbox?

Delphi 如何LiveBind具有自定义样式的Firemonkey TListbox?,delphi,firemonkey,delphi-xe5,livebindings,Delphi,Firemonkey,Delphi Xe5,Livebindings,遵循“RAD Studio\12.0\Samples\FireMonkey\CustomListBox”中的EMB示例“自定义列表” 它通过代码演示了如何在列表框中自定义项 按代码在TListBox上插入一项: // create custom item Item := TListBoxItem.Create(nil); Item.Parent := ListBox1; Item.StyleLookup := 'CustomItem'; Item.Text := 'item

遵循“RAD Studio\12.0\Samples\FireMonkey\CustomListBox”中的EMB示例“自定义列表”

它通过代码演示了如何在列表框中自定义项

按代码在TListBox上插入一项:

  // create custom item
  Item := TListBoxItem.Create(nil);
  Item.Parent := ListBox1;
  Item.StyleLookup := 'CustomItem';
  Item.Text := 'item ' + IntToStr(Item.Index); // set filename
  if Odd(Item.Index) then
    Item.ItemData.Bitmap := Image1.Bitmap // set thumbnail
  else
    Item.ItemData.Bitmap := Image2.Bitmap; // set thumbnail
  Item.StylesData['resolution'] := '1024x768 px'; // set size
  Item.StylesData['depth'] := '32 bit';
  Item.StylesData['visible'] := true; // set Checkbox value
我想专门使用LiveBinding做同样的事情

我可以成功展示样式并绑定一些项目:

以及一些LiveBinding(使用原型):

这是delphi示例中的自定义样式:

我的问题是:

  • 如何访问其他3个已定义项以填充数据
  • 如何从按钮和复选框中获取事件(两者都指向同一个事件处理程序)
  • 我怎样才能使它在一个框架中工作?在设计时没有工作的样式本组件
  • 奖金问题:)

    是否有可能让上述所有内容都与专门用于此类需求的样式本一起使用?(一个只包含所有TListBoxItems和Sytles的样式本?),所以不要弄乱表单定义的样式本