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 

How can I disabling Copy of MyComponent to clipboard

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





PostPosted: Wed Sep 03, 2003 8:22 am    Post subject: How can I disabling Copy of MyComponent to clipboard Reply with quote




I will not copy and cut my component.
I want do same as TTabSheet.
How can I make disable the facility copy of
MyComponent to clipboard?

Back to top
Remy Lebeau (TeamB)
Guest





PostPosted: Sat Sep 06, 2003 9:12 am    Post subject: Re: How can I disabling Copy of MyComponent to clipboard Reply with quote




"Jialing" <Jialing (AT) yaho (DOT) com> wrote


Quote:
I will not copy and cut my component.
I want do same as TTabSheet.

TTabSheet is not copyable because it is not a standalone component to begin
with. It is part of another component, and as such the IDE will not copy it
directly.

Quote:
I derived a class from TDefaultEditor to manage copy
of MyComponent and override Copy method for it,
but it is not work truly!

As has already been mentioned before, you cannot override
TDefaultEditor::Copy() to do what you are asking for. The component has
already been copied to the clipboard *BEFORE* TDefaultEditor::Copy() is
called. Your best bet would be to just clear the clipbaord manually at that
point, rather than trying to prevent the copy in the first place.


Gambit


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system ([url]http://www.grisoft.com)[/url].
Version: 6.0.515 / Virus Database: 313 - Release Date: 9/1/03




Back to top
Jialing
Guest





PostPosted: Sat Sep 06, 2003 9:44 am    Post subject: How can I disabling Cut of MyComponent to clipboard Reply with quote




I am developing a component SAME AS TPageControl named by
TPaneControl and only it can container of TPane that is
developed by me too, also TPan can be only Child of
TPaneControl.
Now I need to disable CUT & COPY facility of TPane
(Exactly same as TTabSheet).
If you just clear Clipboard manually in Copy Method of
TDefaultEditor you may lost your Component when you cutting it,
isn't it?


Back to top
Remy Lebeau (TeamB)
Guest





PostPosted: Sat Sep 06, 2003 9:30 pm    Post subject: Re: How can I disabling Cut of MyComponent to clipboard Reply with quote


"Jialing" <Jialing (AT) yaho (DOT) com> wrote


Quote:
I am developing a component SAME AS TPageControl
named by TPaneControl and only it can container of TPane
that is developed by me too, also TPan can be only Child of
TPaneControl.

How EXACTLY are your classes set up?

Quote:
Now I need to disable CUT & COPY facility of TPane
(Exactly same as TTabSheet).

I know of no way to disable those, and I cannot find any documentation of it
anywhere, official or otherwise. Whatever Borland is doing with TTabSheet,
it is a private implementation that only they know about. It is not
something that is controlled via runtime code, so it must be something
implemented in one of the private design-time packages which Borland does
not distribute the source code for.


Gambit


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system ([url]http://www.grisoft.com)[/url].
Version: 6.0.515 / Virus Database: 313 - Release Date: 9/1/03




Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (VCL Components Development) 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.