BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

TSplitter

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (VCL Components Usage)
View previous topic :: View next topic  
Author Message
Roland Neubert
Guest





PostPosted: Mon May 30, 2005 8:28 am    Post subject: TSplitter Reply with quote




Hello,

what is the right way to save and load the position of a TSplitter? Do I have to save all the positions (Left, Right...) of all related controls or is there a better way to do it?

Roland
Back to top
Vladimir Stefanovic
Guest





PostPosted: Mon May 30, 2005 7:44 pm    Post subject: Re: TSplitter Reply with quote



Quote:
what is the right way to save and load the position of a
TSplitter?

You can save metrics, for example, in INI or in Registry.

Look at BCB Help for TIniFile or TRegistry for details...

Quote:
Do I have to save all the positions (Left, Right...) of all related
controls or is there a better way to do it?

TSplitter is usually placed in some TPanel and in fact you should
save TPanel's position and TSplitter will follow TPanel.



--
Best regards,
Vladimir Stefanovic



Back to top
Hans Galema
Guest





PostPosted: Tue May 31, 2005 7:56 am    Post subject: Re: TSplitter Reply with quote



Roland Neubert wrote:

Quote:
what is the right way to save and load the position of a TSplitter?

Think that you better do not save the position of a TSplitter.
Because as fas as I know you cannot force a TSplitter to
take a position. (Splitter->Top = 100; does not work.).

Better save but the Heigth or Width of the object that determines the position.

For instance: Two TPanels on a TFrom separated by a -horizontal-
TSplitter. Panel1 Align alTop. Panel2 alClient.

Now at terminating your app save Panel1->Height.
At startup restore.

If there are more splitters on the same form then there will always
be only one object that determines the position of a specific splitter.

Hans.

Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (VCL Components Usage) All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.