Thursday, October 1, 2009

Activate Panel on Class

namespace PanelTesting.Module { public partial class PanelViewController : ViewController { public PanelViewController() { InitializeComponent(); RegisterActions(components); TargetObjectType = typeof(Panel); } protected override void OnActivated() { base.OnActivated(); View.ControlsCreated += new EventHandler(View_ControlsCreated); } void View_ControlsCreated(object sender, EventArgs e) { ((System.Windows.Forms.Control)View.Control).HandleCreated += new EventHandler(PanelViewController_HandleCreated); } void PanelViewController_HandleCreated(object sender, EventArgs e) { LabelControl lbTitle2 = new LabelControl(); lbTitle2.Appearance.BackColor = System.Drawing.Color.Transparent; lbTitle2.Appearance.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F); //lbTitle2.Appearance.ForeColor = System.Drawing.SystemColors.ActiveCaptionText; //lbTitle2.Appearance.Options.UseBackColor = true; lbTitle2.Appearance.Options.UseFont = true; //lbTitle2.Appearance.Options.UseForeColor = true; lbTitle2.Location = new System.Drawing.Point(12, 32); lbTitle2.Name = "lbTitle2"; lbTitle2.Size = new System.Drawing.Size(183, 20); lbTitle2.TabIndex = 5; lbTitle2.Text = "by Cevious Technologies Pvt. Ltd."; // // lbTitle1 // LabelControl lbTitle1 = new LabelControl(); lbTitle1.Appearance.BackColor = System.Drawing.Color.Transparent; lbTitle1.Appearance.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold); //lbTitle1.Appearance.ForeColor = System.Drawing.SystemColors.ActiveCaptionText; //lbTitle1.Appearance.Options.UseBackColor = true; lbTitle1.Appearance.Options.UseFont = true; //lbTitle1.Appearance.Options.UseForeColor = true; lbTitle1.Location = new System.Drawing.Point(12, 4); lbTitle1.Name = "lbTitle1"; lbTitle1.Size = new System.Drawing.Size(104, 20); lbTitle1.TabIndex = 4; lbTitle1.Text = "Applicatin Testing"; PanelControl lbCaption = new PanelControl(); lbCaption.Controls.Add(lbTitle2); lbCaption.Controls.Add(lbTitle1); lbCaption.Dock = System.Windows.Forms.DockStyle.Top; lbCaption.Font = new System.Drawing.Font("Tahoma", 14.25F, System.Drawing.FontStyle.Bold); //lbCaption.Font2 = new System.Drawing.Font("Tahoma", 11.25F); lbCaption.Location = new System.Drawing.Point(0, 0); lbCaption.Name = "lbCaption"; lbCaption.Size = new System.Drawing.Size(828, 60); lbCaption.TabIndex = 2; lbCaption.TabStop = false; lbCaption.SuspendLayout(); ((System.Windows.Forms.Control)sender).Parent.Controls.Add(lbCaption); } }

No comments:

Post a Comment

Mat Table Angular

Mat Table in Angular Mat table is used to display data . its a material designed styled data-table . For using Material Table MatTableMo...