Defining VCL-like framework for Python (OT in comp.lang.python)

Roberto Lupi Roberto.Lupi at ascu.unian.it
Mon May 24 04:01:39 EDT 1999


[this is off topic in comp.lang.python, I have set the follow-up to 
comp.lang.pascal.delphi.misc]

In article <199905191942.VAA26784 at axil.hvision.nl>, ivnowa at hvision.nl 
says...
> It's a matter of taste and choice. One area where Delphi bites me is that 
> when you design X forms, only slightly different, you have to design all X of 
> them from scratch. Sure, you can copy & paste and such, but when you need to 
> change code, you'll have to do it in all the forms. Not very maintainable. -- 
> Of course experienced Delphi "programmers" have ways to avoid or minimize 
> this, but my point is, putting the layout of the form in code does have its 
> benefits. In Python/Tk, you can design a more or less abstract class, then 
> derive from it.

Delphi has support for what you describe for very long time (since Delphi 
2 if I remember correctly, perhaps from Delphi 1). It's called Visual 
Form Inheritance in Delphi-speak.

Look up "Object Repository" in the help file.

It's simple: if you want to derive from an existant form, just select 
File|New... go to the tab with the same name as the current project, 
select the ancestor form and check that Inherit is the selected item in 
the radio group at the bottom.

-- 
Roberto Lupi

IT consultant
Software Developer




More information about the Python-list mailing list