Home > Net >  Invoke another FORM in the XtraTabControl problem, please have a look the great god!
Invoke another FORM in the XtraTabControl problem, please have a look the great god!

Time:12-17

Want to call in a Form1 FrMain XtraTabControl of main page (tcMain), use the following code, home page does not show new page1,

Private void toolStripButton2_Click (object sender, EventArgs e)
{
DevExpress. XtraTab. XtraTabPage page1=new DevExpress. XtraTab. XtraTabPage ();
Page1. Text="public statements";
FrMain FRM=new FrMain ();
//((CH_SAMPLE_SYS FrMain) enclosing the Owner). TcMain. TabPages. Add (page1);

FRM. TcMain. TabPages. Add (page1);


}

CodePudding user response:

This is a new object, not the original, can know about the cross form calls (entrust, fields, properties)

CodePudding user response:

Please pass the great spirit of combining needs help to look at,

CodePudding user response:

Only is not enough, also need to set the parent attribute, can traverse to the child controls associated with container control,
  •  Tags:  
  • C#
  • Related