Recent

Author Topic: KOL-CE + lazarus + events [WITH ANSWER]  (Read 6600 times)

trom

  • Newbie
  • Posts: 3
KOL-CE + lazarus + events [WITH ANSWER]
« on: May 15, 2008, 03:45:03 pm »
Ok it's a stupid question but i ask it ;)

I have make A project using this help
>>> http://wiki.lazarus.freepascal.org/KOL-CE#Creating_MCK_project

I have put all my components and Now i just would like to ADD some events like Bitbtn1.onclick ;

But Via the Components property events it doesn't work :'(

How i can do this ??

I put My KOL-CE unit1.PAS source here :

{ KOL MCK } // Do not remove this line!
{$DEFINE KOL_MCK}
{$ifdef FPC} {$mode delphi} {$endif}
unit Unit1;

interface

uses Windows, Messages, KOL {place your units here->}
{$IFDEF LAZIDE_MCK}, Forms, mirror, Classes, Controls, mckCtrls, mckObjs, Graphics;
{$ELSE} ; {$ENDIF}

type

  { TForm1 }

  {$I MCKfakeClasses.inc}
  {$IFDEF KOLCLASSES} TForm1 = class; PForm1 = TForm1; {$ELSE OBJECTS} PForm1 = ^TForm1; {$ENDIF CLASSES/OBJECTS}
  TForm1 = {$IFDEF KOLCLASSES}class{$ELSE}object{$ENDIF}({$IFDEF LAZIDE_MCK}TForm{$ELSE}TObj{$ENDIF})
    BitBtn1: TKOLBitBtn;
    Form: PControl;
    GradientPanel1: TKOLGradientPanel;
    ImageList1: TKOLImageList;
    KOLForm1: TKOLForm;
    KOLProject1: TKOLProject;
    Label1: TKOLLabel;
    Memo1: TKOLMemo;
    OpenSaveDialog1: TKOLOpenSaveDialog;
    ProgressBar1: TKOLProgressBar;
    Toolbar1: TKOLToolbar;
    procedure GradientPanel1Click(Sender: PObj);
  private
    { private declarations }
  public
    { public declarations }
  end;

var
  Form1 {$IFDEF KOL_MCK} : PForm1 {$ELSE} : TForm1 {$ENDIF} ;

{$IFDEF KOL_MCK}
procedure NewForm1( var Result: PForm1; AParent: PControl );
{$ENDIF}


implementation

{$IFDEF KOL_MCK}
{$I unit1_1.inc}
{$ENDIF}

{ TForm1 }

initialization
{$IFNDEF KOL_MCK} {$I unit1.lrs} {$ENDIF}

end.    

Thanks in adavance

KOL-CE is great thanks at the autors :D

I precise that
I use Lazarus 0.9.25 and FPC 2.2.1 WINDOWS XP and Kol-Ce svn today
u have try too Lazarus 0.9.25 and FPC 2.2.0 windows XP and Kol-Ce svn today
I have make a try with this source code : http://www.jvdw.nl/speedtest.zip
And the events in this source code doesn't work for me ????

trom

  • Newbie
  • Posts: 3
KOL-CE + lazarus + events [WITH ANSWER]
« Reply #1 on: May 15, 2008, 06:16:46 pm »
Ok
I found my error !!

If someone have the same problem that me,
"Read The doc ENTIRELY !!!!"

The solution is here :

http://wiki.lazarus.freepascal.org/KOL-CE#Installation

don't forget to do this :
   1.  Run Lazarus.
   2. Choose Tools > Configure "Build Lazarus"... menu item.
   3. Choose Clean Up + Build all on Quick Build Options page.
   4. Open Advanced Build Options page and add -dDisableFakeMethods into Options input field.
   5. Click Build button to rebuild Lazarus.

Thanks to the autors of MCK KOL is an excellent units kit ;)

josD

  • Newbie
  • Posts: 3
KOL-CE + lazarus + events [WITH ANSWER]
« Reply #2 on: September 29, 2008, 04:35:14 pm »
I have some problem with the TKOLImageList Component(version 2.80.1)...

When I drop it on the from....

"Error creating componet: TKOLImageList
Invalid horizontal pixel index 0"

I have deinstall and intall KOLCE without it fix the problem..

 

TinyPortal © 2005-2018