Click here to Skip to main content
15,895,557 members
Home / Discussions / C#
   

C#

 
AnswerRe: frog puzzle Pin
Paul Conrad21-Jul-06 9:31
professionalPaul Conrad21-Jul-06 9:31 
AnswerRe: frog puzzle Pin
Professor Sharada Ulhas21-Jul-06 11:09
Professor Sharada Ulhas21-Jul-06 11:09 
GeneralRe: frog puzzle Pin
Paul Conrad21-Jul-06 11:17
professionalPaul Conrad21-Jul-06 11:17 
GeneralRe: frog puzzle Pin
Judah Gabriel Himango21-Jul-06 12:00
sponsorJudah Gabriel Himango21-Jul-06 12:00 
QuestionDynamic Page Creation? Pin
OMalleyW21-Jul-06 8:20
OMalleyW21-Jul-06 8:20 
AnswerRe: Dynamic Page Creation? Pin
Not Active21-Jul-06 8:55
mentorNot Active21-Jul-06 8:55 
GeneralRe: Dynamic Page Creation? Pin
OMalleyW21-Jul-06 14:03
OMalleyW21-Jul-06 14:03 
QuestionCopying UserControl Variables Pin
TheBlindWatchmaker21-Jul-06 7:22
TheBlindWatchmaker21-Jul-06 7:22 
Hi!

I have a few instances (say 10) of a UserControl, each with 5 properties, on a Form. I want to implement a "Copy From" function that works the following way:

1. The user can right click on any UserControl. The right click menu allows the user to select a Copy From menu item which springs up a ToolStripComboBox with a list of other similar controls.

2. Once the user selects an instance of the UserControl in the ToolStripComboBox, that UserControl's properties are to be copied to the current UserControl.

Each UserControl has a ControlID property that is unique to it (listed in an eControlID enum.) This property will not be copied over. However, the ToolStripComboBox is populated with all the IDs (say A...Z) to help the user identify the UserControl whose properties he wants copied.

I have got this far:

<br />
private void ContextMenuCopyFrom_SelectedIndexChanged(object sender, EventArgs e)<br />
        {<br />
            this.ControlID= (eControlID)ContextMenuCopyFrom.SelectedIndex;          <br />
        }<br />


How do I actually figure out which UserControl has been selected to copy from and then copy the properties.

I figure it'll be something like

<br />
    this.Property1 = UserControlSelected.Property1;<br />
    this.Property2 = UserControlSelected.Property2;<br />
    // etc<br />

AnswerRe: Copying UserControl Variables Pin
atuldeore21-Jul-06 9:11
atuldeore21-Jul-06 9:11 
GeneralRe: Copying UserControl Variables Pin
TheBlindWatchmaker21-Jul-06 10:19
TheBlindWatchmaker21-Jul-06 10:19 
QuestionEmail sending in Win Application Pin
alimohammed21-Jul-06 5:30
alimohammed21-Jul-06 5:30 
GeneralRe: Email sending in Win Application Pin
atuldeore21-Jul-06 5:49
atuldeore21-Jul-06 5:49 
GeneralRe: Email sending in Win Application Pin
alimohammed21-Jul-06 5:55
alimohammed21-Jul-06 5:55 
GeneralRe: Email sending in Win Application Pin
atuldeore21-Jul-06 6:01
atuldeore21-Jul-06 6:01 
AnswerRe: Email sending in Win Application Pin
Judah Gabriel Himango21-Jul-06 6:00
sponsorJudah Gabriel Himango21-Jul-06 6:00 
GeneralRe: Email sending in Win Application Pin
alimohammed21-Jul-06 6:06
alimohammed21-Jul-06 6:06 
QuestionDataset.LoadXml() Pin
moon_stick21-Jul-06 5:06
moon_stick21-Jul-06 5:06 
QuestionImplementing disabled text in a UserControl ? [modified] Pin
LongRange.Shooter21-Jul-06 4:36
LongRange.Shooter21-Jul-06 4:36 
AnswerRe: Implementing disabled text in a UserControl ? Pin
atuldeore21-Jul-06 5:32
atuldeore21-Jul-06 5:32 
Questionlistbox sort by dates with dd.mm.yyyy format Pin
fracalifa21-Jul-06 4:17
fracalifa21-Jul-06 4:17 
AnswerRe: listbox sort by dates with dd.mm.yyyy format Pin
Andrew Rissing21-Jul-06 4:33
Andrew Rissing21-Jul-06 4:33 
AnswerRe: listbox sort by dates with dd.mm.yyyy format [modified] Pin
LongRange.Shooter21-Jul-06 4:39
LongRange.Shooter21-Jul-06 4:39 
GeneralRe: listbox sort by dates with dd.mm.yyyy format Pin
fracalifa21-Jul-06 5:19
fracalifa21-Jul-06 5:19 
QuestionVisual Studio crashes [modified] Pin
SJ_Phoenix21-Jul-06 4:01
SJ_Phoenix21-Jul-06 4:01 
AnswerRe: Visual Studio crashes Pin
Mike Dimmick21-Jul-06 4:05
Mike Dimmick21-Jul-06 4:05 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.