rkView component

rkView v1.1 is done and ready for download. ParentFont support have been added and a problem with scrollbar calculation have been fixed. Please do report back if the problem is not solved.

What is rkView?
rkView is my solution for a listview/gridview. I do not like the included TListview that comes with Delphi so I made my own. That way I have full control of how it works and act.

The best way to see what you can do with rkView is to download any of the thumbnail demos. More demos will come later. If you make a demo using rkView I would love to see it, maybe it could be included as a demo?

Download rkView

Roy M Klever

Tags: , , ,

  • Alin

    adding this component to a form breaks Code Insight (on Delphi 2010)

  • http://atorg.net.ru/ Alex

    cool. Thanks for component.

  • admin

    I have that fixed and will do a repost …

  • stevedobresky

    Thanks for the great component, Roy!

    Is there any way to programmatically select items at runtime?

  • admin

    Hi Steve,

    Yes do it like this:

    rkView.Selection.Add(ItemNr);
    rkView.Invalidate; // to update view

    To clear a selection use:

    rkView.Selection.Clear;
    rkView.Invalidate; // to update view

    I gone post an update to rkView today and then I can add a simple demo showing how to select items via code.

    Roy M Klever

  • stevedobresky

    Thanks Roy!

    I tried this on the Project Thumbnails Part2 demo. When I manually select the item, the background stays blue. And when I apply these two lines of code, the bg became gray and remains gray until I deselect then select the item again. What's wrong?

    Waiting for an update of your excellent component!

  • admin

    Well I was hoping to have the update uploaded but time is a problem for the moment … I am guessing you have a focus problem here… The items get grey when component lose focus. If you after selecting cells do a rkView.SetFocus you will see it works as expected.

    Roy M Klever

  • mrbar2000

    Roy this is a great component, but there is some way to create a template schema to draw item? i dont like very much use canvas to paint what we need on component!
    I'have thinked a script way to your rkView draw itself!
    Can you have some idea?

  • Edwin

    Hi Roy, great component!

    Is there any way of reordering the items with drag and drop? It'll be perfect if you can see the moving item(s) when dragging the items.

  • admin

    Hi Edwin,

    This is not so easy to do unless you know how to draw the items … and rkView leaves that part to you so I think this should be done outside the component.

    Regards
    Roy

  • admin

    Hi,

    Well using a script for painting items would be to slow I think … This component is more the basic of a view than a complete solution. It is quite easy to build a component with this as base I think. Personally I do not like “one for all ” solutions … but if someone have a good idea for an implementation of such a solution I would be interested.
    I belive there allready do exist a grid/listview that can use a template for painting its items. Take a look at http://www.bergsoft.net

    Regards
    Roy

  • Marcos

    Roy I just think very dull write on canvas man, there is some way to show items on rkView without draw on canvas rightly?

  • Alexander

    Very beautiful component again. I'm looking for a way to populate the grid from a table with JPEG blobs in a loop. Have you come across any ideas on how to do this with your component?

    I use following code to read the jpeg from the table into a TImage:

    procedure TfrmMain.BoekenAfterScroll(DataSet: TDataSet);
    var
    JpegImage: TJPEGImage;
    BlobStream: TStream;

    begin
    if (not frmMain.Boeken.FieldByName('BK_COVER').IsNull) then
    begin
    BlobStream := frmMain.Boeken.CreateBlobStream(frmMain.Boeken.FieldByName('BK_COVER'),bmRead);
    JpegImage := TJPEGImage.Create;
    try
    JpegImage.LoadFromStream(BlobStream);
    frmMain.Cover.Picture.Assign(JpegImage);
    frmMain.Cover.Visible := True;
    except
    on E: Exception do
    begin
    ShowMessage(E.ClassName+' fout geconstateerd, met melding : '+E.Message);
    end;
    end;
    JpegImage.Free;
    BlobStream.Free;
    RzStatusPane2.Caption := IntToStr(Boeken.RecNo) + '/'+ IntToStr(Boeken.RecordCount);
    end
    else
    frmMain.Cover.Visible := False;
    end;

blog comments powered by Disqus