TIP: Click on subject to list as thread! ANSI
echo: delphi
to: ALL
from: ALEXANDER ZAVALISHIN
date: 1997-06-12 16:04:00
subject: How to generate components quickly

Hello from Russia!
 First I'll quote my last letter because a new problem that I am facing 
relates to the same application .
>I am writing a visual form designer (adapted to our local database
>structure). It looks much like Delphi - a user places diffenent
>components on a form and adjust their properties, a macro-language
>description is built automatically. Forms can be rather complicated and
>contain  up to 200-300 components (standart components (like labels,
>groupboxes, tabbednotebooks etc.) and dbaware (dbedits and dbgrids
>mostly)). These components are generated run-time (from a macro
>description) and this is where the problem appears.
[skiped]
 When I design a complicated form (like 200 components) using Delphi, compile 
the project and choose 'RUN' the program lunches very quickly. Just a couple 
of seconds and the form is on the screen. But if I try to generate all the 
components at run-time:
    {
    var
     ...
     ControlClass: TControlClass;
    begin
     ,..
     for i:= 1 to NumberOfComponents do
      begin
       ControlClass := TControlClass(TDBEdit) {or anything}
       ControlClass.Create(MyForm)
      end;
     ...
end;
    }
 the components appear rather slow - sometimes it takes more than 30 seconds 
for the form to appear. I do not show the form until it stops loading, it 
helps a little. ARE THERE ANY OTHER TRICKS to improve the perfomance of the 
algorithm? Like using streams to create components?
    Best regards,
                                            Alexandre
---
---------------
* Origin: Выпьем, няня, где же кружка? (2:5020/630.37)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.