diff options
author | drewski207 <drewski207@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2007-08-07 21:13:08 +0000 |
---|---|---|
committer | drewski207 <drewski207@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2007-08-07 21:13:08 +0000 |
commit | 5f5fa582f61f7c11efdb60494990ff07bc716b87 (patch) | |
tree | a7ac38c7f18084c923c1a1682ee94c3f891381fd /examples/gui/listviewtest | |
parent | bb4616fa1af67de6012a714fe7158b61fa1b0c1a (diff) | |
download | fpGUI-5f5fa582f61f7c11efdb60494990ff07bc716b87.tar.xz |
* Most Keyhandling for listview
* Listview uses better colors for drawing
* Better listview selection control
* Minor changes to listview example
Diffstat (limited to 'examples/gui/listviewtest')
-rw-r--r-- | examples/gui/listviewtest/listviewtest.lpr | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/examples/gui/listviewtest/listviewtest.lpr b/examples/gui/listviewtest/listviewtest.lpr index a8d64a31..af06eb66 100644 --- a/examples/gui/listviewtest/listviewtest.lpr +++ b/examples/gui/listviewtest/listviewtest.lpr @@ -44,8 +44,8 @@ var begin FListView.BeginUpdate; FTmpListView.BeginUpdate; - FListView.Items.Capacity := FListView.Items.Capacity +1000000; - for I := 0 to 999999 do begin + FListView.Items.Capacity := FListView.Items.Capacity + 2000; + for I := 0 to 1999 do begin Item := FListView.ItemAdd; Item.Caption :=FEdit.Text+IntToStr(FListView.Items.Count); Item.SubItems.Add('0'); @@ -68,6 +68,9 @@ procedure TMainForm.PaintItem(ListView: TfpgListView; ACanvas: TfpgCanvas; Item: TfpgLVItem; ItemIndex: Integer; Area: TRect; var PaintPart: TfpgLVItemPaintPart); begin if ItemIndex mod 2 = 0 then ACanvas.TextColor := clRed; + if ItemIndex mod 3 = 0 then ACanvas.TextColor := clBlue; + if ItemIndex mod 4 = 0 then ACanvas.TextColor := clGray; + if ItemIndex mod 5 = 0 then ACanvas.TextColor := clPink; end; constructor TMainForm.Create(AOwner: TComponent); @@ -148,6 +151,8 @@ begin FQuitButton := TfpgButton.Create(Self); with FQuitButton do begin Parent := Self; + ImageName := 'stdimg.Quit'; + ShowImage := True; Top := 420; Left := 210; Width := 80; |