HighTechTalks DotNet Forums  

question about copy/paste/cut in designer

Dotnet Framework (WinForms DesignTime) microsoft.public.dotnet.framework.windowsforms.designtime


Discuss question about copy/paste/cut in designer in the Dotnet Framework (WinForms DesignTime) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
grace lee
 
Posts: n/a

Default question about copy/paste/cut in designer - 09-28-2007 , 10:51 PM






hi:
Now I have implemented the copy/paste/cut by calling the StandardCommands
in the windows designer, I have some additional problem: when i copy some
controls in the designer, then paste them and new Name would be made.
ex: I copy "textbox1" and "textbox2",and then paste them as "textbox3" and
"textbox4", how can i know which controls i copied or cut from? or
"textbox1" becomes "textbox3" or "textbox4"?
(because i have some special binding somethings which can be found by
original control name)

thanks a lot :-)


Grace



Reply With Quote
  #2  
Old   
G Himangi
 
Posts: n/a

Default Re: question about copy/paste/cut in designer - 10-01-2007 , 04:07 AM






AFAIK, there is no way to determine the original name of the pasted control.

---------
- G Himangi, Sky Software http://www.ssware.com
Shell MegaPack : GUI Controls For Drop-In Windows Explorer like Shell
Browsing Functionality For Your App (.Net & ActiveX Editions).
EZNamespaceExtensions.Net : Develop namespace extensions rapidly in .Net
EZShellExtensions.Net : Develop all shell extensions,explorer bars and BHOs
rapidly in .Net
---------


"grace lee" <lilj (AT) inspur (DOT) com> wrote

Quote:
hi:
Now I have implemented the copy/paste/cut by calling the StandardCommands
in the windows designer, I have some additional problem: when i copy some
controls in the designer, then paste them and new Name would be made.
ex: I copy "textbox1" and "textbox2",and then paste them as "textbox3" and
"textbox4", how can i know which controls i copied or cut from? or
"textbox1" becomes "textbox3" or "textbox4"?
(because i have some special binding somethings which can be found by
original control name)

thanks a lot :-)


Grace




Reply With Quote
  #3  
Old   
Timker .
 
Posts: n/a

Default Re: question about copy/paste/cut in designer - 10-08-2007 , 11:06 AM



Actually, you can do a property comparison. The copied control will have
all the same values as the original except name.

ex:
create new button (name="Button1", Text="Button1)
create new button (name="Button2", Text="Button2)

select both, copy, paste
pasted button (name="Button3, Text="Button1")
pasted button (name="Button4, Text="Button2")

In this example you know that Button3 is a copy of Button1 because they
both have the same Text property. It is possible, obviously, for
multiple controls to have the same Text property values. You can
mitigate this risk by looking at more properties.



*** Sent via Developersdex http://www.developersdex.com ***

Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.