delphi - how do i align a tpanel to a very bottom of listview item -
what try same image
thing have tried panel1.top := listview1.items[i].position.y;
but didnt success trick , there possibly way aligned tpanel @ bottom of items
actual code added
procedure ttestthreading.streamclick(sender: tobject); var i, r: integer; begin if stream.caption = 'stream' begin := 0 listview1.items.count - 1 if listview1.items[i].subitems[3] = inttostr(uniqueid) begin r := listview1.items[i].index; panel2.top := listview1.items[i].position.y; end; exchangeitems(listview1, r, 0); stream.caption := 'stopstream'; panel2.visible := true; // start stream end else if stream.caption = 'stopstream' begin exchangeitems(listview1, r, 0); stream.caption := 'stream'; panel2.visible := false; // stopstream end; end;
if check documentation http://docwiki.embarcadero.com/libraries/xe2/en/vcl.comctrls.tlistitem.position see tlistitem.position works when listview view style either vsicon or vssmallicon.
so instead of using position property should rather use displayrect method http://docwiki.embarcadero.com/libraries/xe2/en/vcl.comctrls.tlistitem.displayrect returns rectangle in list item rendered.
Comments
Post a Comment