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 

drawing pages with shapes

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Graphics
View previous topic :: View next topic  
Author Message
XJ
Guest





PostPosted: Mon Mar 28, 2005 12:49 pm    Post subject: drawing pages with shapes Reply with quote



Hello evetybody,

I need some advise on how to approach to the following:

I have created a simple application basically with a main form with a
scrolling box area inside it (alClient aligned) where the user can drop and
move some simple shapes (rectangles, squares, ellipses) around. The shapes
are all derived fromTGraphicControl and i create them at runtime with the
Scrollbox as Parent.
Now I'd like to add a "page" feature so that the user could draw not only on
the "main form scroll box area" but also be able to add "pages" like the
main one and then save/load all the created pages, each one containing the
shapes dropped there by the user.

How could I do something like this?
Any sample would be greatly appreciated

Thanks in advance for your suggestions/tips


Back to top
Peter Below (TeamB)
Guest





PostPosted: Mon Mar 28, 2005 3:14 pm    Post subject: Re: drawing pages with shapes Reply with quote



In article <4247fd68 (AT) newsgroups (DOT) borland.com>, Xj wrote:
Quote:
I need some advise on how to approach to the following:

I have created a simple application basically with a main form with a
scrolling box area inside it (alClient aligned) where the user can drop and
move some simple shapes (rectangles, squares, ellipses) around. The shapes
are all derived fromTGraphicControl and i create them at runtime with the
Scrollbox as Parent.
Now I'd like to add a "page" feature so that the user could draw not only on
the "main form scroll box area" but also be able to add "pages" like the
main one and then save/load all the created pages, each one containing the
shapes dropped there by the user.

How could I do something like this?
Any sample would be greatly appreciated

Drop a TPagecontrol on the form, create a tabsheet for each of the pages
(perhaps only one at start if the user can create more at will), drop your
scrollbox on the tabsheet.

You now have as many scrollboxes as you have tabsheets, so you have to make
sure you refer to the correct scrollbox (the one on the active tabsheet) when
handling control drops etc.. If the scrollbox is the only control on a tabsheet
you can get its reference with

scrollbox := Pagecontrol.activepage.Controls[0] as TScrollbox;

Needs a few safeguards, of course, for example checking that ActivePage is <>
nil before you access it.

--
Peter Below (TeamB)
Use the newsgroup archives :
http://www.mers.com/searchsite.html
http://www.tamaracka.com/search.htm
http://groups.google.com
http://www.prolix.be



Back to top
Nils Haeck
Guest





PostPosted: Wed Mar 30, 2005 9:30 am    Post subject: Re: drawing pages with shapes Reply with quote



DtpDocuments has all this functionality, but might be overkill. Nevertheless
I think it could help you to check it out (there's a trial):
http://www.simdesign.nl/dtpdocuments.html

Have a look at the editor demo (comes with sources).

The individual pages are accessible through the thumbnails at the bottom.

Kind regards,

Nils Haeck
www.simdesign.nl

"XJ" <nospam (AT) nospam (DOT) com> wrote

Quote:
Hello evetybody,

I need some advise on how to approach to the following:

I have created a simple application basically with a main form with a
scrolling box area inside it (alClient aligned) where the user can drop
and
move some simple shapes (rectangles, squares, ellipses) around. The shapes
are all derived fromTGraphicControl and i create them at runtime with the
Scrollbox as Parent.
Now I'd like to add a "page" feature so that the user could draw not only
on
the "main form scroll box area" but also be able to add "pages" like the
main one and then save/load all the created pages, each one containing the
shapes dropped there by the user.

How could I do something like this?
Any sample would be greatly appreciated

Thanks in advance for your suggestions/tips





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