delphi - Add multiple TFrame controls to TScrollBox -
i'm doing little offline shopping cart application here delphi , i'm stuck. need insert frame scrollbox (act shopping cart item row, can remove item, add quantity , on) on product select listview. can't add multiple frames there.
procedure tfrmmain.lvproductsselectitem(sender: tobject; item: tlistitem; selected: boolean); var cartrow: tframe1; i: integer; count: integer; begin cartrow := tframe1.create(nil); cartrow.edit1.text := item.caption; cartrowarr := tobjectlist<tframe1>.create; cartrowarr.add(cartrow); count := cartrowarr.count; := 0 cartrowarr.count - 1 begin scrollbox1.insertcontrol(cartrowarr[i]); end; end;
it's on frame there , can't right. if select product need insert frame, if select product need insert antoher frame. if product select alredy there, raise quantity one.
any appreciated!
i suspect want multiple frames in scroll box end below each other. have tried adding
cartrow.align := altop;
this cause rows automatically align next each other vertically.
Comments
Post a Comment