Watch, Follow, &
Connect with Us

Please visit our new home
community.embarcadero.com.


Welcome, Guest
Guest Settings
Help

Thread: Copy Component and sync.


This question is answered.


Permlink Replies: 1 - Last Post: Feb 11, 2018 8:51 AM Last Post By: Antonio Estevez Threads: [ Previous | Next ]
James L

Posts: 33
Registered: 8/3/03
Copy Component and sync.  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 11, 2018 5:44 AM
Hello sir,

My form2 ComboBox2 need to copy form1 ComboBox1 component,

My code like this:
ComboBox2 = Form1->ComboBox1;
But it's doesn't work...

I want to copy all items form ComboBox1, and sync select same itemindex.

Thank you for help,

James
Antonio Estevez

Posts: 665
Registered: 4/12/00
Re: Copy Component and sync.
Correct
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 11, 2018 8:51 AM   in response to: James L in response to: James L
El 11/02/2018 a las 14:44, James L escribió:
Hello sir,

My form2 ComboBox2 need to copy form1 ComboBox1 component,

My code like this:
ComboBox2 = Form1->ComboBox1;
But it's doesn't work...

I want to copy all items form ComboBox1, and sync select same itemindex.

Thank you for help,

James

Try this:
ComboBox2->Items= Form1->ComboBox1->Items;
ComboBox2->ItemIndex= Form1->ComboBox1->ItemIndex;
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02