Software
Delphi and Lazarus
Trekking and Events
Blog and Forum
Čeština English
Main menu
Blog
Useful Links

interesting webs & galleries of my friends:

F-Web

Máša&Pája Gallery

Delphi and Lazarus:

Embarcadero/ CodeGear

Lazarus project

Torry's Delphi pages

JEDI Code Library

 

Problem with comments and logins

I apologize to all registered users and visitors for a database error on my website (my fault). Unfortunately I had no recent backup. I had to recover from some older backup. I asked my provider for a newer backup but it was too expensive. I was quite upset with the price they charged for it. I'll have to change the provider, that's for sure.
 

Home | Software | Delphi and Lazarus | Trekking, travelling | Sport | Others | Blog

Search in comments: 
inserted: 2011-09-11 11:12:55   Reply...
From: Adem
Justine: Ouch.. I remembered the days I was in your shoes and it was painful. And, yes, you're right someone should help you. But, the questions you're asking is hardly peculiar to KGrid --while they are important ones, they are too basic to tackle here. (...TEXT REMOVED BY ADMIN...) Please do not give up. You'll like Delphi; you really will :)
inserted: 2011-04-28 10:25:38   Reply...
From: Justine
Hi, I'm a student trying to make a transition from Basic to Delphi. I'm using my dad's work PC to write a program that manages an archive for a project but the string grid doesn't do some of the things I want so I want to use the KGrid 1.7 instead. I don't understand how to integrate it into the environment however. The Delphi documentation is too scant for me to understand or what I find on the net is for different versions (like vmirce's comment above) My dad's PC has RAD Studio 2010, I can get to the Main Menu, Component, but I'm confused if I should Install a Package or Import a Component as neither gets me to where *.dpk files are selectable as a default. I have never done this before so I wouldn't have a clue - I have managed to work my way through just about everything with a few examples, study and some thought but can't with this one. Hope I'm not wasting anyone's time, J
inserted: 2011-07-09 03:55:13   Reply...
From: Justine
Hi, I see that there is no response to my post but there is an update to Delphi XE. I have a evaluation of XE and tried everyway I can and failed to install this. Maybe people don't read these comments but how do people learn - I get responses on other boards; I'm just saying that there should be some basic install instructions - just something at least. Maybe I'm just wasting my time and I'll just stay with Microsoft products, at least I get a response.. Please give me a response; there is no point in putting up lovely pictures of something that beginners can't learn about or have little hope in installing to understand.
inserted: 2010-12-02 21:11:39   Reply...
From: vmirce
I've just downloaded Kgrid1.7 (I'm using D7) and tried to install. I clicked MainMenu->Component->InstallComponent, then I selected the kgrid_D7.dpk and cicked OK. The IDE opened some kgriddesig.pas unit which i tried to compile (didn't know what should do). In the message console i got : [Fatal Error] kgraphics.pas(35): File not found: 'PngImage.dcu' What should I do to solve ?
inserted: 2010-12-04 13:40:35   Reply...
From: tk
Either download PngImage component (http://pngimage.codeplex.com/releases/view/17357) or comment out following define in kcontrols.inc: {$DEFINE USE_PNG_SUPPORT}
inserted: 2010-10-03 11:34:34   Reply...
From: Adem
Hi, Could you make the KGrid a *more* virtual grid, please. I mean, there should be something like an OnCellText() event so that the parent application can provide the required data on the fly.
inserted: 2010-10-04 08:38:19   Reply...
From: tk
Hi I understand your issue but you can do this in a very simple way through OnDrawCell event where just 2 lines need to be written: TKGrid(Sender).CellPainter.Text := 'your text'; TKGrid(Sender).CellPainter.DefaultDraw;. I'm not sure if I should make an extra event for this.
inserted: 2010-10-05 16:40:56   Reply...
From: Adem
One of the most user-unfriendly aspect about grids is that they consider fixed rows/cols as part of the grid, when they really shouldn't. After all, these are static headers and should be treated separately. Here is what I mean: Cells[0, 0] (usually) refer to a cell in fixed rows/cols if FixedRow/FixedCol counts are greater than zero. Thing is, when you're working with a grid (especially a virtual grid) your own data is zero indexed. And, having to add FixedRowCount and/or FixedColCount counts (minus 1) is a source of bugs and a waste of time. To solve that, I'd suggest we have 3 events, namely: OnFixedColText(Sender: TObject; AIndex: Cardinal; ACellPainter: TKGridCellPainter); OnFixedRowText(Sender: TObject; AIndex: Cardinal; ACellPainter: TKGridCellPainter); OnCornerCellText(Sender: TObject; ACellPainter: TKGridCellPainter); where the latter refers to the cell at the top left corner which is part of (n)either row or column. It should be treated separately because when FixedRowCount or FixedColCount is zero, there won't be a corner cell. Now, the case for OnCellText(Sender: TObject; ARowIdex: Cardinal; AColIndex: Cardinal; ACellPainter: TKGridCellPainter) When we issue a Grid.Invalidate, this event should be fired (but, only for those cells that are visible). Since it contains ARowIdex and AColIndex, the main app has directly applicable indices to its internal data. And ACellPainter parameter lets the main app paint the cell as it likes. BTW, names of these events can also be OnXXXXPaint instead of OnXXXXText.
inserted: 2010-10-05 19:35:12   Reply...
From: tk
I understand this but I personally like that "Borland" solution. I agree it is less comfortable especially for virtual grids but it is more generous. Since I have started using KGrid I almost always used virtual grids and I quite got used to "- 1" indexing. I almost always use one fixed row as header and sometimes one fixed column. I further think your solution is not generous enough, there can be images etc. I would name those events OnDrawFixedRowCell etc. CellPainter is only 1 for 1 kgrid instance thus there is no extra parameter necessary.
inserted: 2010-10-05 16:44:47   Reply...
From: Adem
<p>I wish this forum thing kept line/paragraph formatting.. I mean I even don't want to have to read my own blurb above since it's one single block of text.</p> <p>I'll try adding paragraph tags and see if turns out better --if not, please delete this one.</p> <p>Here is my comment:</p> <p>One of the most user-unfriendly aspect about grids is that they consider fixed rows/cols as part of the grid, when they really shouldn't.</p> <p>After all, these are static headers and should be treated separately.</p> <p>Here is what I mean: Cells[0, 0] (usually) refer to a cell in fixed rows/cols if FixedRow/FixedCol counts are greater than zero.</p> <p>Thing is, when you're working with a grid (especially a virtual grid) your own data is zero indexed. </p> <p>And, having to add FixedRowCount and/or FixedColCount counts (minus 1) is a source of bugs and a waste of time.</p> <p>To solve that, I'd suggest we have 3 events, namely:</p> <p>OnFixedColText(Sender: TObject; AIndex: Cardinal; ACellPainter: TKGridCellPainter); OnFixedRowText(Sender: TObject; AIndex: Cardinal; ACellPainter: TKGridCellPainter); OnCornerCellText(Sender: TObject; ACellPainter: TKGridCellPainter);</p> <p>where the latter refers to the cell at the top left corner which is part of (n)either row or column. It should be treated separately because when FixedRowCount or FixedColCount is zero, there won't be a corner cell.</p> <p>Now, the case for OnCellText(Sender: TObject; ARowIdex: Cardinal; AColIndex: Cardinal; ACellPainter: TKGridCellPainter)</p> <p>When we issue a Grid.Invalidate, this event should be fired (but, only for those cells that are visible).</p> <p>Since it contains ARowIdex and AColIndex, the main app has directly applicable indices to its internal data.</p> <p>And ACellPainter parameter lets the main app paint the cell as it likes.</p> <p>BTW, names of these events can also be OnXXXXPaint instead of OnXXXXText.</p>
inserted: 2010-10-05 20:42:38   Reply...
From: Adem
Well.. '-1' indexing is in no way general. If you have more than one FixedCol and/or FixedRow, you'll have to subtract them (respectively) from your actual index.
inserted: 2010-10-06 13:40:13   Reply...
From: tk
Of course -1 indexing is no general but that was no issue here. The problem is whether to implement such extra events plus some extra option e.g. gxVirtualGrid to enable that "virtual" indexing to all other cell-related events. And what with all other methods like PointToCell etc.? I think current implementation is simply better, not confusing and what ppl. are familiar with. Kgrid was designed to retain maximum compatibility with TStringgrid. I think it is very simple to use something like this just at the entry point of each event handler: Item := TDataItem(FDataItems[ARow - TKGrid(Sender).FixedRows]); In this example all the data that need to be virtualized are encapsulated within the Item object, you need to subtract fixedrows only once per event. For columns I use the InitialCol method: ICol := G.InitialCol(ACol);
inserted: 2010-09-10 20:58:51   Reply...
From: oopman
Is it possible to right or center text in tkgrid columns?
inserted: 2010-09-10 22:22:04   Reply...
From: tk
Yes via CellPainter.HAlign property.
inserted: 2010-06-18 16:11:20   Reply...
From: vovach777
Bug report When i drop KGrid on Frame, and drop it Frame to Form, my Delhi 2007 is down with message: " (A7328832){bds.exe } [A7329832] (0000D707){KGrid_D11.bpl} [00C0E707] (00011F5E){KGrid_D11.bpl} [00C12F5E] (00011FC3){KGrid_D11.bpl} [00C12FC3] [20D24A7F]{designide100.bpl} Update.TUpdateFiler.Filter (Line 195, "Update.pas" + 6) + $A [20D249DC]{designide100.bpl} Update.TUpdateFiler.Create (Line 173, "Update.pas" + 5) + $2 [20D2579D]{designide100.bpl} Update.TUpdateObject.Create (Line 711, "Update.pas" + 28) + $E [20D258DA]{designide100.bpl} Update.TUpdateObject.AddChild (Line 747, "Update.pas" + 12) + $1A [201439BB]{vcl100.bpl } Controls.TWinControl.GetChildren (Line 9177, "Controls.pas" + 4) + $D [2015833F]{vcl100.bpl } Forms.TCustomFrame.GetChildren (Line 2727, "Forms.pas" + 1) + $A [200069A8]{rtl100.bpl } System.@CallDynaInst (Line 9162, "sys\system.pas" + 3) + $0 [20D257D3]{designide100.bpl} Update.TUpdateObject.Create (Line 714, "Update.pas" + 31) + $1E [20D26702]{designide100.bpl} Update.TUpdateManager.Create (Line 1194, "Update.pas" + 9) + $14 [20D47EA1]{designide100.bpl} ComponentDesigner.TComponentRoot.FrameCreateComponent (Line 3037, "ComponentDesigner.pas" + 36) + $33 [201406A7]{vcl100.bpl } Controls.TWinControl.WndProc (Line 7304, "Controls.pas" + 111) + $6 [2000A332]{rtl100.bpl } System.TInterfacedObject._AddRef (Line 17972, "sys\system.pas" + 1) + $4 [20006894]{rtl100.bpl } System.TObject.GetInterface (Line 9003, "sys\system.pas" + 8) + $A [200068C6]{rtl100.bpl } System.TObject.GetInterface (Line 9009, "sys\system.pas" + 14) + $10 [2000A332]{rtl100.bpl } System.TInterfacedObject._AddRef (Line 17972, "sys\system.pas" + 1) + $4 [20006894]{rtl100.bpl } System.TObject.GetInterface (Line 9003, "sys\system.pas" + 8) + $A [200068C6]{rtl100.bpl } System.TObject.GetInterface (Line 9009, "sys\system.pas" + 14) + $10 [2000A332]{rtl100.bpl } System.TInterfacedObject._AddRef (Line 17972, "sys\system.pas" + 1) + $4 [20006894]{rtl100.bpl } System.TObject.GetInterface (Line 9003, "sys\system.pas" + 8) + $A [200068C6]{rtl100.bpl } System.TObject.GetInterface (Line 9009, "sys\system.pas" + 14) + $10 [2000A30F]{rtl100.bpl } System.TInterfacedObject.QueryInterface (Line 17964, "sys\system.pas" + 1) + $8 [2000A348]{rtl100.bpl } System.TInterfacedObject._Release (Line 17977, "sys\system.pas" + 1) + $4 [2000A264]{rtl100.bpl } System.@IntfClear (Line 17824, "sys\system.pas" + 7) + $0 [20D47FB7]{designide100.bpl} ComponentDesigner.TComponentRoot.ReaderCreateComponent (Line 3060, "ComponentDesigner.pas" + 1) + $7 [20037840]{rtl100.bpl } Classes.CreateComponent (Line 6493, "common\Classes.pas" + 5) + $18 [20037AC8]{rtl100.bpl } Classes.TReader.ReadComponent (Line 6549, "common\Classes.pas" + 11) + $1 [20038D49]{rtl100.bpl } Classes.TReader.ReadComponents (Line 7042, "common\Classes.pas" + 11) + $5 [20D48796]{designide100.bpl} ComponentDesigner.TComponentRoot.ReadStream (Line 3252, "ComponentDesigner.pas" + 28) + $14 [20D487C8]{designide100.bpl} ComponentDesigner.TComponentRoot.ReadStream (Line 3256, "ComponentDesigner.pas" + 32) + $5 [20D48425]{designide100.bpl} ComponentDesigner.TComponentRoot.SelectReadStream (Line 3178, "ComponentDesigner.pas" + 4) + $10 [20D48442]{designide100.bpl} ComponentDesigner.TComponentRoot.SelectReadStream (Line 3180, "ComponentDesigner.pas" + 6) + $B [20D47957]{designide100.bpl} ComponentDesigner.TComponentRoot.PasteSelectionFromStream (Line 2904, "ComponentDesigner.pas" + 3) + $A [20D502AA]{designide100.bpl} ComponentDesigner.TComponentDesigner.PasteSelectionFromStream (Line 6189, "ComponentDesigner.pas" + 2) + $9 [2165AC53]{delphicoreide100.bpl} CompPalMgr.TFramePalettePageItemDelegate.CreateComponent (Line 2792, "CompPalMgr.pas" + 34) + $17 [20D460C9]{designide100.bpl} ComponentDesigner.TComponentRoot.DoCreateComponent (Line 2308, "ComponentDesigner.pas" + 10) + $17 [20D2FFBA]{designide100.bpl} Designer. + $0 [20159E7F]{vcl100.bpl } Forms.TCustomForm.WndProc (Line 3512, "Forms.pas" + 136) + $5 [2132827C]{vclactnband100.bpl} ActnMenus.CallWndHook (Line 703, "ActnMenus.pas" + 12) + $F [21D93E3F]{delphivclide100.bpl} VCLFormContainer.TControlSizer.ControlWndProc (Line 306, "VCLFormContainer.pas" + 33) + $C [2003203C]{rtl100.bpl } Classes.TThreadList.UnlockList (Line 3359, "common\Classes.pas" + 0) + $4 [200EBAA8]{vcl100.bpl } Graphics.FreeMemoryContexts (Line 5060, "Graphics.pas" + 12) + $5 [2013FDD0]{vcl100.bpl } Controls.TWinControl.MainWndProc (Line 7073, "Controls.pas" + 3) + $6 [2013FDE5]{vcl100.bpl } Controls.TWinControl.MainWndProc (Line 7076, "Controls.pas" + 6) + $0 [20040E4C]{rtl100.bpl } Classes.StdWndProc (Line 11583, "common\Classes.pas" + 8) + $0 [2000A332]{rtl100.bpl } System.TInterfacedObject._AddRef (Line 17972, "sys\system.pas" + 1) + $4 [20006894]{rtl100.bpl } System.TObject.GetInterface (Line 9003, "sys\system.pas" + 8) + $A [200068C6]{rtl100.bpl } System.TObject.GetInterface (Line 9009, "sys\system.pas" + 14) + $10 [2000A332]{rtl100.bpl } System.TInterfacedObject._AddRef (Line 17972, "sys\system.pas" + 1) + $4 [20006894]{rtl100.bpl } System.TObject.GetInterface (Line 9003, "sys\system.pas" + 8) + $A [200068C6]{rtl100.bpl } System.TObject.GetInterface (Line 9009, "sys\system.pas" + 14) + $10 [2000A332]{rtl100.bpl } System.TInterfacedObject._AddRef (Line 17972, "sys\system.pas" + 1) + $4 [216596D0]{delphicoreide100.bpl} CompPalMgr.TPaletteItemDelegate._AddRef (Line 2269, "CompPalMgr.pas" + 1) + $6 [20006894]{rtl100.bpl } System.TObject.GetInterface (Line 9003, "sys\system.pas" + 8) + $A [200068C6]{rtl100.bpl } System.TObject.GetInterface (Line 9009, "sys\system.pas" + 14) + $10 [216567CC]{delphicoreide100.bpl} CompPalMgr.TPalettePageItem.QueryInterface (Line 1281, "CompPalMgr.pas" + 2) + $1B [2001AE86]{rtl100.bpl } SysUtils.Supports (Line 16990, "sys\sysutils.pas" + 1) + $9 [2000A348]{rtl100.bpl } System.TInterfacedObject._Release (Line 17977, "sys\system.pas" + 1) + $4 [216E16C4]{delphicoreide100.bpl} PasCppCmds.TDesignEnvironment.GetCurCompClass (Line 544, "PasCppCmds.pas" + 3) + $18 [20D4B2F6]{designide100.bpl} ComponentDesigner.TComponentRoot.CreateCurrentComponent (Line 4340, "ComponentDesigner.pas" + 2) + $32 [20D4B31B]{designide100.bpl} ComponentDesigner.TComponentRoot.CreateCurrentComponent (Line 4343, "ComponentDesigner.pas" + 5) + $10 [20D5BA02]{designide100.bpl} Surface.TDesignSurface.CreateItem (Line 187, "surface.pas" + 1) + $11 [20D30CAE]{designide100.bpl} Designer.TDesigner.DoDragCreate (Line 764, "Designer.pas" + 1) + $F [20D31430]{designide100.bpl} Designer.TDesigner.DragEnd (Line 929, "Designer.pas" + 19) + $3 [20D3398C]{designide100.bpl} Designer.TDesigner.MouseUp (Line 1711, "Designer.pas" + 1) + $2 [05259F22]{vcldesigner100.bpl} VCLSurface.MouseEvent (Line 2882, "vclsurface.pas" + 45) + $11 [0525D42E]{vcldesigner100.bpl} VCLSurface.TVclDesignSurface.GetSelectionMessages (Line 4373, "vclsurface.pas" + 3) + $5 [2003203C]{rtl100.bpl } Classes.TThreadList.UnlockList (Line 3359, "common\Classes.pas" + 0) + $4 [2003236B]{rtl100.bpl } Classes.TInterfaceList.GetCount (Line 3470, "common\Classes.pas" + 5) + $6 [0525AAF7]{vcldesigner100.bpl} VCLSurface.TVclDesignSurface.IsDesignMsg (Line 3143, "vclsurface.pas" + 48) + $6 [20006936]{rtl100.bpl } System.@IsClass (Line 9077, "sys\system.pas" + 1) + $8 [2013C2AF]{vcl100.bpl } Controls.TControl.WndProc (Line 5067, "Controls.pas" + 4) + $21 [20161B8F]{vcl100.bpl } Forms.TApplication.WndProc (Line 7769, "Forms.pas" + 82) + $E [2014010B]{vcl100.bpl } Controls.TWinControl.IsControlMouseMsg (Line 7168, "Controls.pas" + 1) + $9 [201406A7]{vcl100.bpl } Controls.TWinControl.WndProc (Line 7304, "Controls.pas" + 111) + $6 [20159E7F]{vcl100.bpl } Forms.TCustomForm.WndProc (Line 3512, "Forms.pas" + 136) + $5 [21D93E3F]{delphivclide100.bpl} VCLFormContainer.TControlSizer.ControlWndProc (Line 306, "VCLFormContainer.pas" + 33) + $C (001CD0F8){mmx_bds5.dll} [0739E0F8] [2013FDD0]{vcl100.bpl } Controls.TWinControl.MainWndProc (Line 7073, "Controls.pas" + 3) + $6 [20040E4C]{rtl100.bpl } Classes.StdWndProc (Line 11583, "common\Classes.pas" + 8) + $0 [2004A49E]{rtl100.bpl } Contnrs.TComponentList.GetItems (Line 380, "common\Contnrs.pas" + 1) + $4 [201625F0]{vcl100.bpl } Forms.TApplication.ProcessMessage (Line 8105, "Forms.pas" + 23) + $1 [2016262A]{vcl100.bpl } Forms.TApplication.HandleMessage (Line 8124, "Forms.pas" + 1) + $4 [2016291F]{vcl100.bpl } Forms.TApplication.Run (Line 8223, "Forms.pas" + 20) + $3 [0042297A]{bds.exe } bds.bds (Line 195, "" + 7) + $7 "
inserted: 2010-08-05 07:26:38   Reply...
From: tk
This has been corrected for v. 1.6.
inserted: 2010-06-16 14:04:39   Reply...
From: Rolf
Hi tk, I'm using your TKGrid component. Very well doing and a lot of nice ideas. I'd like to help a little bit in bug fixing if possible: - TKGrid doesn't support empty grids with a header line only (FixedRows=1 and RowCount=1) - Some strange graphic behaviour when I try to scroll right a grid which fits perfectly to it's client area. The unused area outside of the grid columns is not cleaned up. - A virtual grid shows foused (clicked) cells in CellFocusedBkGnd color although there's nothing done in DrawCell.
inserted: 2010-02-04 14:58:12   Reply...
From: Bill
Thank you for the copy of the KIcon code. I recently had to rebuild my Lazarus environment and I got the following compile error, I am marking the spot with a --> so that you can see. I am not sure why the code in the KGrid component complained unless it has something to do with the changes in the KIcon code changes you sent me. D:\lazarus\components\KControls\source\kgrids.pas(4733,33) Error: Can't assign values to const variable procedure TKGridCellPainter.DrawCellText(const ARect: TRect; AHAlign: TKTextHAlign; AVAlign: TKTextVAlign; AHPadding, AVPadding: Integer; const AText: {$IFDEF STRING_IS_UNICODE}string{$ELSE}WideString{$ENDIF}; ABackColor: TColor; Attributes: TKTextAttributes); begin --> DrawAlignedText(FCanvas, ARect, AHAlign, AVAlign, AHPadding, AVPadding, AText, ABackColor, Attributes); end; I commented out the code in error for now and wait for your response. If it is due to the pre-release copy of the KIcon code please let me know. I will not use any of the KGrid yet. Thank you.
inserted: 2010-02-04 20:06:31   Reply...
From: tk
I made a small change in kgraphics.pas (function DrawAlignedText) for kgrid 1.6. Please keep that commented out.
My account
Top downloads
Recently modified

KControls Development Suite

by: tk

2010-11-08

KHexEditor

by: tk

2010-11-08

KGrid

by: tk

2010-11-08

KIcon

by: tk

2009-11-24

KGrid 1.3 released.

by: tk

2009-08-10

Recently inserted

KComponents as open source

by: tk

2011-04-16

Problem with comments and logins

by: tk

2010-01-29

KControls released

by: tk

2009-10-15

Working hard on KGrid update...

by: tk

2009-06-22

EMWD

by: tk

2007-12-03

No translation available

by: tk

2007-10-30