 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Muhammad Mamouri Guest
|
Posted: Thu Aug 24, 2006 7:38 pm Post subject: Save, Restore position of docked form! |
|
|
Hi
I want to save, restore positons of docked form. I have a panel named
pnlDockedForm and I dock Form2 and Form3 into this panel at OnCreate
event of my main form.
Now I want to save, restore position of these forms. There are two
methods (LoadFromStream and SaveToStream) in IDockInterface that sould
work for this problem. but they don't work.
Here is a function that I use form Loading layout:
procedure LoadLayout;
var
AStream: TMemoryStream;
begin
if not FileExists(ExtractFilePath(Application.ExeName) +
'Layout.dat') then Exit;
AStream := TMemoryStream.Create;
try
AStream.LoadFromFile(ExtractFilePath(Application.ExeName) +
'Layout.dat');
AStream.Position := 0;
ScrollBox1.DockManager.LoadFromStream(AStream);
finally
AStream.Free;
end;
end;
And here is the function that I use for saving the layout:
procedure SaveLayout;
var
AStream: TMemoryStream;
begin
AStream := TMemoryStream.Create;
try
ScrollBox1.DockManager.SaveToStream(AStream);
AStream.Position := 0;
AStream.SaveToFile(ExtractFilePath(Application.ExeName) +
'Layout.dat');
finally
AStream.Free;
end;
end;
Does somebody know why these two methods are not working?
Regards |
|
| Back to top |
|
 |
Riki Wiki Guest
|
Posted: Sat Aug 26, 2006 11:28 am Post subject: Re: Save, Restore position of docked form! |
|
|
Hoi
You need to repost your question on the Borland news server to make
everybody see it and possibly answer your question. Further, this news
group do not officially exist, the group to use is
b.p.d.vcl.components.using.win32.
How to post to Delphi newsgroups:
<http://delphi.wikia.com/wiki/Delphi_Newsgroups> |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|