delphi - Listbox set Item.Detail at runtime -
i new stack overflow , new delphi xe7.
i stuck @ particular part of programming; have been working on multi device application , formatted listbox using livebindings designer. listbox shows first line of address (house) under item.text in livebindings , postcode property in item.detail in livebindings. therefore each entry in listbox has first line , postcode of address taken internal database.
when add new address program have managed update database full address , listbox first line of address @ runtime, not know how access item.detail part @ runtime include postcode. appreciated
"... how access item.detail part @ runtime"
see fmx.listbox.tlistboxitem.itemdata.
access in runtime via:
apostcodestring := listboxitem.itemdata.detail; // when reading listboxitem.itemdata.detail := apostcodestring; // when writing
when adding item listbox, take reference item @ same time:
var listboxitem : tlistboxitem; ... listboxitem := listbox.items.add(sometext); listboxitem.itemdata.detail := apostcodestring;
Comments
Post a Comment