Discussion:
question about copy/paste/cut in designer
(too old to reply)
grace lee
2007-09-29 02:51:45 UTC
Permalink
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
G Himangi
2007-10-01 08:07:33 UTC
Permalink
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
---------
Post by grace lee
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
Timker .
2007-10-08 15:06:51 UTC
Permalink
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 ***

Loading...