[lazarus] Can someone help?
Shane Miller
SMiller1 at stvgb.org
Wed May 3 12:02:36 EDT 2000
To design a form, just look at the examples directory. The basics are
TForm1 = class(TForm)
Button1 : TButton;
private
Procedure Button1Click(Sender : TObject);
public
constructor Create(AOwner : TComponent);
end;
var
Form1 : TForm;
implementation
Constructor TForm1.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
Button1 := TButton.Create;
with Button1 do
Begin
parent := Self; //set to the form
Caption := 'Test Button';
Visible := True;
OnClick := @Button1Click;
end;
end;
Procedure TForm1.Button1Click(sender : Tobject);
Begin
Form1.Caption := 'Button Clicked';
End;
To create a new form is easy because you don't need to assign the parent and such because technocally there isn't one. You do have to call it's create but that's usually done in the Application.CreateForm(..) procedure....
This help any?
Shane
>>> moodcon at pacbell.net 05/03/00 09:22AM >>>
Hi Marc,
I followed your suggestion, and now fpc doesn't complain about not being
able to find units. Now I just need to figure out how to correctly tell it
how to design a form :-)
Chris
----- Original Message -----
From: "Marc Weustink" <weus at quicknet.nl>
To: <lazarus at miraclec.com>; "Lazarus Mail" <lazarus at miraclec.com>
Sent: Tuesday, May 02, 2000 4:19 PM
Subject: Re: [lazarus] Can someone help?
> At 15:51 02-05-2000 -0700, Chris Moody wrote:
> >Hi all,
> >
> >I started playing around with fpc, to see if I could make a Windowed app.
I
> >tried the following code in both Windows and Linux, and both of them give
me
> >some odd errors.
> >
> >When I try to build the project, I am told that System/SysLinux doesn't
> >exist (although I tell the compiler exactly where to look, using the -Fu
> >option)
>
> This won't work (or you have have to include all locations)
>
> >Also, if I asked ppc386 to just look at the unit, it complained also, I'm
> >assuming because I didn't know exactly how a file that describes a form
gets
> >put together.
> >
> >Below is the code for the unit that describes the form, can someone tell
me
> >the order in how it should appear in the file? And also tell me how do I
get
> >the system to recognize System and LinuxSystem?
>
> If you want to compile things without makefile, make sure your rtl and
fcl
> dir are made.
> Copy the .o and .ppu files from ./rtl/linux and ./fcl/linux to
./units/linux
> Point the compiler to this units dir (-Fu commandline or ppc386.cfg). Make
> sure you dont refer to the rtl or fcl dir.
>
> Marc
>
>
>
>
>
> _________________________________________________________________
> 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