-1

Say I have a listview control in tabPage1 which has all preset property. Possible to copy all values and put it into tabPage2?

I am using the stupid method, which is

newlistview1.size=listview1.size
newlistview1.color=listview1.color
etc
user3398315
  • 331
  • 6
  • 17
  • possible duplicate of [Copying variables from one picturebox to another without making them change with each other](http://stackoverflow.com/questions/23153434/copying-variables-from-one-picturebox-to-another-without-making-them-change-with) – Sayse Apr 21 '14 at 09:18
  • sorry did not state that dynamically – user3398315 Apr 21 '14 at 09:19
  • Yes it need to be in sync – user3398315 Apr 21 '14 at 09:23
  • I assigned using newbutton1=button1 and now the button on my tabPage1 is missing – user3398315 Apr 21 '14 at 09:24
  • I think this is what you are looking for http://stackoverflow.com/questions/3473597/it-is-possible-to-copy-all-the-properties-of-a-certain-control-c-window-forms – Mohamed Apr 21 '14 at 09:28

1 Answers1

1

You can do that using System.Reflection

It is possible to copy all the properties of a certain control? (C# window forms)

Hope this helps

Community
  • 1
  • 1
Mohamed
  • 470
  • 3
  • 14