Add multiple TFrame controls to TScrollBox

I'm doing a little offline shopping cart application here with Delphi and I'm stuck. I need to insert frame to scrollbox (act as shopping cart item row, where I can remove item, add quantity and so on) on product select from listview. But I can't add multiple frames there.

    procedure TfrmMain.lvProductsSelectItem(Sender: TObject; Item: TListItem;
  Selected: Boolean);
  cartRow: TFrame1;
  i: Integer;
  count: Integer;

  cartRow := TFrame1.Create(nil);
  cartRow.Edit1.Text := Item.Caption;
  cartRowArr := TObjectList<TFrame1>.Create;
  count := cartRowArr.Count;
  for i := 0 to cartRowArr.Count - 1 do

It's always on frame there and can't get it right. If I select product I need to insert frame, if I select another product I need to insert antoher frame. If product that I select is alredy there, then raise quantity by one.

Any help appreciated!


I suspect that you want multiple frames in the scroll box to end up below each other. Have you tried adding

cartRow.Align := alTop;

This would cause the rows to automatically align themselves next to each other vertically.

Need Your Help

Extend jQuery UI slider to make range draggable

jquery-ui slider jquery-ui-slider

I was wondering if anyone had any advice or examples for how to extend the jQuery UI slider to make the range draggable? Basically what I want it something similar to this, but I'd like to be able to

UnicodeDecodeError: 'utf8' in Python 2.7

python-2.7 utf-8 decode

I have a large file that has many lines, most of the lines are utf8, but looks like a few of lines are not utf8. When I try to read lines with a code like this:

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.