[lazarus] writing GTK programs

Cliff Baeseman vbman at pcpros.net
Tue May 2 00:39:44 EDT 2000


Well yes and no. Remember that Delphi in the background is handling
component creation for you. So say for instance you create one in delphi you
will copy the code over and in the form constructor you will then do
something like this.

Remember no DFM files exist but you can sure use delphi to code with to
speed things along. I do this all of the time code a bunch of stuff in
delphi , copy it over to the linux box and tweek just a tad and compile.

type
TfmMain = class(TForm)
   Button1:TButton
end;


constructor TfmMain.Create
begin
  Button1 := TButton.Create(Self)
  Button1.Height := 20
  Button1.Width := 20
  Button1.OnClick := @MyButtonOnClick;
end;

This means you will have to set all of the properties of the components in
the create manually. In the future of course the
forms designer will do this for you.

Cliff

-----Original Message-----
From: Chris Moody <moodcon at pacbell.net>
To: lazarus at miraclec.com <lazarus at miraclec.com>
Date: Monday, May 01, 2000 9:16 PM
Subject: Re: [lazarus] writing GTK programs


>Hi all,
>
>Does the following message, along with messages from other people, mean
that
>I could make a form in Delphi 3, and then call it from FPK?
>
>Assuming of course, I limited my form to options availble in FPK.
>
>Thanks,
>
>Chris
>----- Original Message -----
>From: "Michael A. Hess" <mhess at miraclec.com>
>To: <lazarus at miraclec.com>
>Sent: Monday, May 01, 2000 5:30 PM
>Subject: Re: [lazarus] writing GTK programs
>
>
>> Chris Moody wrote:
>> >
>> > Actually my question was more supposed to mean: Since Lazarus doesn't
>> > have a form editor, what commands do I use to create forms, put
>> > buttons on the form, ect.
>> >
>> > I don't know GTK at all (being mainly a Winblowz person) and would
>> > like to increase my knowledge, but not sure where to start.
>>
>> That is just the point that was trying to be made. You don't have to
>> know anything about GTK+. You are using the LCL which is compatible with
>> Delphi's VCL. Code it the same way you would in Delphi without using the
>> form designer. Create the form and add the controls to it. Check out
>> some of the applications in the examples directory.
>>
>> --
>> ==== Programming my first best destiny! ====
>>
>> Michael A. Hess      Miracle Concepts, Inc.
>> mhess at miraclec.com   http://www.miraclec.com
>>
>> _________________________________________________________________
>>      To unsubscribe: mail lazarus-request at miraclec.com with
>>                 "unsubscribe" as the Subject
>>     archives at http://www.miraclec.com/list_archives/lazarus
>
>_________________________________________________________________
>     To unsubscribe: mail lazarus-request at miraclec.com with
>                "unsubscribe" as the Subject
>    archives at http://www.miraclec.com/list_archives/lazarus
>






More information about the Lazarus mailing list