[Lazarus] Another newbie question

Héctor Fiandor Rosario hfiandor at infomed.sld.cu
Thu May 15 18:13:36 CEST 2008


Dear Bill de Carle:

I do (in the master form) what you say to show (in a slave form) some 
information to the user, and when readed, it has a buttom to go back.

in the master form I do:

procedure TfBasicaInterno.Revisar1Click(Sender: TObject);   //Revisar = 
review
label 1;
begin
     fRevisar := TfRevisar.create(self);
     fRevisar.ShowModal;
     fRevisar.free;
    ...(other things)
end;

and in the slave form (fRevisar) I do:

show the information in a ListBox

procedure TfRevisar.Regresar1Click(Sender: TObject);   //Regresar=go back
begin
     ModalResult:=1;
end;

excuse me the spanish language.

Ing. Héctor F. Fiandor
hfiandor at infomed.sld.cu

----- Original Message ----- 
From: "Bill de Carle" <ve2iq at magma.ca>
To: "General mailing list" <lazarus at lazarus.freepascal.org>
Sent: Thursday, May 15, 2008 11:20 AM
Subject: [Lazarus] Another newbie question


>I would like to add a feature to my application but can't figure out
> how to do it.
> Basically, when the user clicks on a button in Form1 I'd like a new
> window to open
> up somewhere else on the desktop.  This new window is only for
> displaying lines of
> text which I already have as strings in RAM.  As each new item is
> entered via Form1
> I'll send one line of text to the new window, appending it to
> whatever is already
> displayed in that window.  The new window should have a vertical
> scroll bar in case
> the number of lines becomes too large to view all at once.  The user
> should have the
> ability to operate the scroll bar and to click on a red X at the top
> right corner of
> the new window to close it when he gets tired of seeing it.  Of
> course, my code will
> need a way to learn when the new window has been closed by the user
> so I don't keep
> sending additional lines to it.  I've seen this feature on several
> Windows programs
> so it must be already in the can somewhere.  I don't know enough of the 
> Windows
> jargon and I have no idea what the accepted name of such a component
> might be.  I
> thought I might be able to use a Tlistbox widget on a separate form
> but when I asked
> Lazarus to open a new form it automatically created a new unit as
> well and everything
> got more complicated.  Can someone please provide a hint or tell me
> the name of the
> component I need?  Perhaps there is an example somewhere.
> Thanks in advance,
> Bill
>
> _______________________________________________
> Lazarus mailing list
> Lazarus at lazarus.freepascal.org
> http://www.lazarus.freepascal.org/mailman/listinfo/lazarus 




More information about the Lazarus mailing list