Recent

Author Topic: KGrid 1.3  (Read 25393 times)

tk

  • Sr. Member
  • ****
  • Posts: 361
KGrid 1.3
« on: August 10, 2009, 01:13:09 pm »
Hi all,
I ported KGrid to Lazarus (Windows widgetset only, tested on 0.9.26.2). Everything should work. The only exception is changing the goAlignLastxx option at runtime because of the CreateParams problem in LCL (see ID 14288 in bugtracker).

Download at:http://www.tkweb.eu/en/delphicomp/kgrid.html
« Last Edit: August 10, 2009, 03:31:44 pm by tk »

laguna

  • Sr. Member
  • ****
  • Posts: 323
Re: KGrid 1.3
« Reply #1 on: August 10, 2009, 09:15:09 pm »
Source code is disponible?

tk

  • Sr. Member
  • ****
  • Posts: 361
Re: KGrid 1.3
« Reply #2 on: August 10, 2009, 09:22:08 pm »
Yes it is FWS.

deepblue

  • New Member
  • *
  • Posts: 26
Re: KGrid 1.3
« Reply #3 on: August 11, 2009, 06:42:23 am »
@tk: thanks a lot.  :D

deepblue

  • New Member
  • *
  • Posts: 26
Re: KGrid 1.3
« Reply #4 on: August 11, 2009, 09:48:22 am »
nice grids..could you give some example how to use/connect its grid with database? how to enter the data?
thanks

tk

  • Sr. Member
  • ****
  • Posts: 361
Re: KGrid 1.3
« Reply #5 on: August 11, 2009, 10:20:00 am »
I have no demo with database connection yet (as I just have started to develop with databases in Delphi). Now the grid must be filled by data manually, I think somebody already did this if I look through the comments on my website. But I'll consider to include a data link property directly into KGrid in the next version.

deepblue

  • New Member
  • *
  • Posts: 26
Re: KGrid 1.3
« Reply #6 on: August 12, 2009, 05:10:08 am »
Opps..sorry..i didn't realize that..but i'm hope that dataaware support available soon as possible.. ;)
thanks

JD

  • Hero Member
  • *****
  • Posts: 1848
Re: KGrid 1.3
« Reply #7 on: August 18, 2009, 08:16:42 am »
Great work TK. The grid demos look good. However, I had problems installing the component in Lazarus.

First, the package could not compile because it could not find "KGrid.pas". I solved this by changing the file path in the compiler options for the project.

Second, when I tried to compile after solving the file path problem I got an error message saying 'Identifier not found "CM_CTL3DCHANGED" '.

It apparently has something to do with the 'Ctl3D' grid property which is available in Delphi but not in Lazarus. Lazarus uses the 'Flat' property instead of the 'Ctl3D' property for its grids.

What do you advise that I do to be able to install the component in Lazarus?

JD
Windows - Lazarus 2.1/FPC 3.2 (built using fpcupdeluxe),
Linux Mint - Lazarus 2.1/FPC 3.2 (built using fpcupdeluxe)

mORMot; Zeos 8; SQLite, PostgreSQL & MariaDB; VirtualTreeView

tk

  • Sr. Member
  • ****
  • Posts: 361
Re: KGrid 1.3
« Reply #8 on: August 18, 2009, 03:28:06 pm »
The package is located in another directory than the sources. You must specify the search path to the sources.

The Ctl3D property is always True in KGrid if compiled in Lazarus. I still could compile with CM_CTL3DCHANGED in 0.9.26.2 but it is apparently not called. Just remove this method from KGrids.pas and it should work. For next version I'll add a workaround for Lazarus.

JD

  • Hero Member
  • *****
  • Posts: 1848
Re: KGrid 1.3
« Reply #9 on: August 18, 2009, 07:23:15 pm »
I am currently commenting out the procedure as well as all references to Ctl3D in the code. I try to compile & install it when I'm done.

I wonder if the code would work if instead of commenting out those references, I change the 'Ctl3D' Delphi property in the code to the 'Flat' Lazarus property.

Thanks for the advice

BTW I use Lazarus 0.9.27 Beta
Windows - Lazarus 2.1/FPC 3.2 (built using fpcupdeluxe),
Linux Mint - Lazarus 2.1/FPC 3.2 (built using fpcupdeluxe)

mORMot; Zeos 8; SQLite, PostgreSQL & MariaDB; VirtualTreeView

cpalx

  • Hero Member
  • *****
  • Posts: 753
Re: KGrid 1.3
« Reply #10 on: August 19, 2009, 01:05:32 am »
Is there any chance to install in Linux environment?

JD

  • Hero Member
  • *****
  • Posts: 1848
Re: KGrid 1.3
« Reply #11 on: August 19, 2009, 08:10:40 am »
Hi there TK,

I finally compiled & installed KGrid in Lazarus 0.9.27 beta FPC 2.2.5 SVN: 21219 of 14/08/2009. The KGrid.pas code was "heavily patched" to remove "Ctl3D" references & I have a shiny new "TK" tab in the Lazarus IDE!

It looks really good. Great work! I'm very keen on using it because it gives me the ability to sort columns & place controls in the grid.

I'm however looking forward to your "final workaround" for Lazarus so I can put away my hacked Kgid.pas and have full functionality.  :D

Lazarus FPC is a great tool & the more controls that are available for it, the more it is likely to be used for serious projects.  :D

Keep up the good work.
« Last Edit: August 19, 2009, 08:36:48 am by JD »
Windows - Lazarus 2.1/FPC 3.2 (built using fpcupdeluxe),
Linux Mint - Lazarus 2.1/FPC 3.2 (built using fpcupdeluxe)

mORMot; Zeos 8; SQLite, PostgreSQL & MariaDB; VirtualTreeView

tk

  • Sr. Member
  • ****
  • Posts: 361
Re: KGrid 1.3
« Reply #12 on: August 19, 2009, 07:21:28 pm »
OK. I'll make ctl3d for delphi and Flat for Lazarus.

Linux portability: KGrid still heavily relies on native windows code. Maybe coz I've never used Lazarus before. However I compiled it under Gtk2 with Windows libraries and most things worked. I'll try to replace the windows API code with LCL code but certain functions not provided by LCL (like layered windows for column dragging) will not work under Linux (unless somebody hints me for replacement :)).

LuizAmérico

  • Sr. Member
  • ****
  • Posts: 457
Re: KGrid 1.3
« Reply #13 on: August 21, 2009, 02:10:44 am »
In order to port VirtualTreeView i created the lclextensions package that implements some winapi functions under gtk/qt. Maybe can be helpful to you.

https://luipack.googlecode.com/svn/trunk/lclextensions

chrnobel

  • Sr. Member
  • ****
  • Posts: 283
Re: KGrid 1.3
« Reply #14 on: August 24, 2009, 10:26:06 am »
In order to port VirtualTreeView i created the lclextensions package that implements some winapi functions under gtk/qt. Maybe can be helpful to you.

https://luipack.googlecode.com/svn/trunk/lclextensions

Hi Luiz, this requires a login.

The VirtualTreeView also requires the multiloglaz, does anyone know where this can be found?

/Christian

 

TinyPortal © 2005-2018