View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0003110 | JEDI VCL | 00 JVCL Components | public | 2005-07-24 04:31 | 2005-08-16 08:16 |
Reporter | anonymous | Assigned To | obones | ||
Priority | normal | Severity | major | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | 3.00 | ||||
Target Version | Fixed in Version | 3.10 | |||
Summary | 0003110: TJvgAskListBox Lose the Items.Objects Value | ||||
Description | For the first time, when you add items to the TJvgAskListBox and assigns an Object for the item, you loose the object for the first items if you add more items than the heoght of the TJvgAskListBox, when its scroll its lose the firsts objects. The problems seems to be in: procedure TJvgAskListBox.RecalcHeights; var I: Integer; R: TRect; begin if Items.Count = 0 then Exit; SendMessage(Handle, LB_GETITEMRECT, Items.Count - 1, LPARAM(@R)); FSegment1Width := Word((R.Right - R.Left) - (FButtonWidth + 1) * (Buttons.Count) - 1); //The problem its here { Items.BeginUpdate; for I := 0 to Items.Count - 1 do begin Items.Insert(I, Items.Strings[I]); Items.Delete(I + 1); end; Items.EndUpdate;} end; I have comented the ItemsUpdate and its seems to work fine. | ||||
Additional Information | It is the code I have used to test it: procedure TForm1.Button1Click(Sender: TObject); var i: integer; begin Asklist.Items.Clear; for i:= 0 to maxi do begin AskList.Items.Objects[Asklist.Items.Add(IntToStr(i))] := TObject(i); end; end; procedure TForm1.AskListClick(Sender: TObject); var i: integer; begin for i:= 0 to maxi do begin Label1.Caption := IntToStr(i) + ':' + IntToStr(Integer(Asklist.Items.Objects[i])); Label1.Update; Sleep(100); end; end; | ||||
Tags | No tags attached. | ||||