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 

Can this be done?

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi VCL Components Writing
View previous topic :: View next topic  
Author Message
Andrew Ofthesong
Guest





PostPosted: Sun Oct 05, 2003 6:47 am    Post subject: Can this be done? Reply with quote



Hi... Generally I develop complex forms, and fill it with panels for
handling resize events of the form.

Most solutions i found on internet are for run-time only.

But that mean that you have to do double work: Example, if a button will
allways be top=5, left=5, and height=parent_height-5 (in a complex-designed
form), then you will have to put in in the desired position in design time,
and write the right code. If now you feel the lefet should be 9 instead of
5, you have to move it in the desing, and also modify the code.

So, I know I can do a component that responds to design-time resizing, but
if the contents of this components are dynamic (i have a button and a
checkbox, and later i decide i should have also a label, hence, changing the
code of resizing), i should be able to change that code to reflect changes
on the IDE...

Any ideas?


Back to top
Ain Valtin
Guest





PostPosted: Sun Oct 05, 2003 4:11 pm    Post subject: Re: Can this be done? Reply with quote



On Sun, 5 Oct 2003 02:47:36 -0400, "Andrew Ofthesong"
<Andrew (AT) NoSpam (DOT) net> wrote:

Quote:
But that mean that you have to do double work: Example, if a button will
allways be top=5, left=5, and height=parent_height-5 (in a complex-designed
form), then you will have to put in in the desired position in design time,
and write the right code.

No, you just set appropriate Anchors. Im sure you can set up your
forms at design-time using TPanels and Align and Anchors properties
wihout coding any OnResize events... ok almost :)

BTW AFAICS your question doesn't have anything to do with component
writing, so c.usiong would be better place to ask...

HTH
ain

Back to top
Taylan Karaoglu
Guest





PostPosted: Sun Oct 05, 2003 5:01 pm    Post subject: Re: Can this be done? Reply with quote



"Andrew Ofthesong" <Andrew (AT) NoSpam (DOT) net> wrote

Quote:
Hi... Generally I develop complex forms, and fill it with panels for
handling resize events of the form.

Filling with panels not so logical at always cause of all panel has got own
its window handle that means all message goes to that panels recursively ..
I prefer using anchors or other ways to handling resize events .

Quote:

Most solutions i found on internet are for run-time only.

But that mean that you have to do double work: Example, if a button will
allways be top=5, left=5, and height=parent_height-5 (in a
complex-designed
form), then you will have to put in in the desired position in design
time,
and write the right code. If now you feel the lefet should be 9 instead of
5, you have to move it in the desing, and also modify the code.

So, I know I can do a component that responds to design-time resizing, but
if the contents of this components are dynamic (i have a button and a
checkbox, and later i decide i should have also a label, hence, changing
the
code of resizing), i should be able to change that code to reflect changes
on the IDE...

Any ideas?



Anchors for that



Back to top
Iain Macmillan
Guest





PostPosted: Tue Oct 07, 2003 10:14 pm    Post subject: Re: Can this be done? Reply with quote


In article <3f7fbdb1 (AT) newsgroups (DOT) borland.com>, "Andrew Ofthesong"
<Andrew (AT) NoSpam (DOT) net> wrote:

Quote:
But that mean that you have to do double work: Example, if a button will
allways be top=5, left=5, and height=parent_height-5
Wow, a stretchy button!

... shouldn't it be (5*Screen.PixelsPerInch) div 96 ?
Quote:
(in a complex-designed
form), then you will have to put in in the desired position in design time,
and write the right code. If now you feel the lefet should be 9 instead of
5, you have to move it in the desing, and also modify the code.

Only if you've got some great desire to see the form at design time.
Otherwise you can put all the components in a big heap and let the code do
the work of positioning!
You have to run it to see what it looks like, but if you are talking about
*complex forms*, - panels covering panels, panels partially covering panels,
components that are only visible under certain conditions,.. - you can't see
what it looks like in the design time view anyway.

And you can't see what it will look like in Large Fonts either.
Or components you will create at run-time.
imho RAD is of limited use.

Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi VCL Components Writing 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.