Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2015-04

howto change the order the components of a Form are created?

4 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

John Landmesser

from Delphi i know there is a editor to change the order in which objects of the Application are created:

I have a IniPropStorage and that has to be created before a FileListView.

Searched the IDE, i know its there, but i can't find it!

Thank you!

Reply by email

Howard Page-Clark
to John Landmesser
John Landmesser wrote 6 lines
from Delphi i know there is a editor to change the order in which objects of the Application are created: I have a IniPropStorage and that has to be created before a FileListView. Searched the IDE, i know its there, but i can't find it!

Project Options lets you order the creation of auto-created forms, but it does not handle other objects.

Can you not dynamically create these two objects in order like this?

procedure TForm1.FormCreate(Sender: TObject);
begin
   FIniPropStorage:=TIniPropStorage.Create(Self);
   //  with FIniPropStorage do ... etc.
   FFilelistbox:=TFileListBox.Create(Self);
   // with FFilelistbox do ...
end;

Howard

---
This email has been checked for viruses by Avast antivirus software. http://www.avast.com

Reply by email

John Landmesser
to Howard Page-Clark
Howard Page-Clark wrote 23 lines
Project Options lets you order the creation of auto-created forms, but it does not handle other objects. Can you not dynamically create these two objects in order like this? procedure TForm1.FormCreate(Sender: TObject); begin FIniPropStorage:=TIniPropStorage.Create(Self); // with FIniPropStorage do ... etc. FFilelistbox:=TFileListBox.Create(Self); // with FFilelistbox do ... end; Howard --- This email has been checked for viruses by Avast antivirus software. http://www.avast.com --

thanks Howard but i was struggling with the wrong problem:

i have a TShellTreeView and i want to set the TShellTreeView.Path property by code ( saved in a ini-File ) , but that doesn't work because you can't assign a string to this property?

        ShellTreeView1.Path := '/media/First_XPS/PROJEKTE/Lazarus/arjgui/';
        ShowMessage(ShellTreeView1.Path);

Path is '' ?!!!

I try again tomorrow :-))

Perhaps windows only, i'm Linux?!!

Reply by email

Vojtěch Čihák
to John Landmesser

This has nothing to do with order of creating components. You can use the code in FormCreate event. But use property Root instead of Path. I'm on Linux too, I just tried: ShellTreeView1.Root := '/home/v1'; and works well. ?
______________________________________________________________

Show quoted text 5 lines
Od: John Landmesser Komu: Datum: 09.04.2015 21:24 P?edm?t: Re: [Lazarus] howto change the order the components of a Form are created?

thanks Howard but i was struggling with the wrong problem:

i have a TShellTreeView and i want to set the TShellTreeView.Path property by code ( saved in a ini-File ) , but that doesn't work because you can't ?assign a string to this property?

 ? ? ? ?ShellTreeView1.Path := '/media/First_XPS/PROJEKTE/Lazarus/arjgui/';
 ? ? ? ?ShowMessage(ShellTreeView1.Path);

Path is '' ?!!!

I try again tomorrow :-))

Perhaps windows only, i'm Linux?!!

Reply by email