Board index » delphi » VISUAL <> OO ---- Form components

VISUAL <> OO ---- Form components

Hi!

I am implementing a program that will simulate
the behavior of a stone-age DOS-program,
consisting of ~50 different screens with
input/output-fields.

I think the way I should implement it is with
each screen as an MDI-child on a MDI-parent
background.  

But if I use a format template for the different
screens, then the code is only copied (not OO),
and if I define a descendant of Tform i cant
manipulate it visually, right?

In the Unleashed there is a sample program for
creating a component from a form (It doesnt
seem to be straight-forward).  But it would
have to be placed on a MDI-child (right?) so
that would be three layers on top of each other?

Any solutions?

Am I thinking on the right things?

Is this a limitation in Delphi => I should choose a
different tool?

Could I avoid the problem by having the MDI-children
"transparent" --- Passing all events to the parent and
inheriting properties from it?  
 _
| | |  _     _        http://www.stud.unit.no/~olavb/
|_| |_|_|_|_|                            Ol...@dds.nl

 

Re:VISUAL <> OO ---- Form components


Quote
On Tuesday, May 07, 1996, Olav wrote...

[snip]
Quote
> But if I use a format template for the different
> screens, then the code is only copied (not OO),
> and if I define a descendant of Tform i cant
> manipulate it visually, right?

[snip]

I'm not sure I follow exactly what you're trying to do, but I can give you
some guidance on making a new form type.  It is possible to make a new
form, and customize the new code you want it to have, strip out the public
var for the form and save it as a unit.  (Basically, now you have a new
form class.)  Then, when you make a new form in your program, simply
change it's declaration from TForm1 = class(TForm); to TForm1 =
class(TMyCustomForm); or whatever you called the new form type.  This
works fine for adding message handlers, and non-published properties, but
I'm not sure how it works for components...  Once you've made your new
form time, created a blank new form, and changed its declaration, you can
then save it as a template so you don't have to do that each time.
--
David S. Becker
ADP Dealer Services (Plaza R&D)
mailto:d...@plaza.ds.adp.com
(503) 402-3236

Re:VISUAL <> OO ---- Form components


The soulution was quite simple ---
Upgrade to 2.0 :-)

Delphi 2.0 has visual form inheritance!

 _
| | |  _     _     http://www.stud.ntnu.no/~olavb/
|_| |_|_|_|_|                         Ol...@dds.nl
                Eyecom Images, Amsterdam

Quote
I wrote:

> Hi!

> I am implementing a program that will simulate
> the behavior of a stone-age DOS-program,
> consisting of ~50 different screens with
> input/output-fields.

> I think the way I should implement it is with
> each screen as an MDI-child on a MDI-parent
> background.

> But if I use a format template for the different
> screens, then the code is only copied (not OO),
> and if I define a descendant of Tform i cant
> manipulate it visually, right?

> In the Unleashed there is a sample program for
> creating a component from a form (It doesnt
> seem to be straight-forward).  But it would
> have to be placed on a MDI-child (right?) so
> that would be three layers on top of each other?

> Any solutions?

> Am I thinking on the right things?

> Is this a limitation in Delphi => I should choose a
> different tool?

> Could I avoid the problem by having the MDI-children
> "transparent" --- Passing all events to the parent and
> inheriting properties from it?
>  _
> | | |  _     _        http://www.stud.unit.no/~olavb/
> |_| |_|_|_|_|                            Ol...@dds.nl

--

Other Threads