Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
TabPage in 2.0
Message
De
08/02/2006 21:02:34
 
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
Divers
Thread ID:
01094743
Message ID:
01094851
Vues:
8
Einar,

I am running into all sorts of sub-classing "issues" with 2.0 which is really frustrating because I only use subclassed stuff in my apps.

Wow, I guess I need to start messing with this more. I'm pretty sure you got the "red" idea from me and I sure hope I don't start running into "issues" ... what kind of "issues" have you encountered? I will be getting into 2.0 pretty heavily starting in April.

~~Bonnie


>Don't scratch it. Please let me know your idea, it might set off some more ideas. I am running into all sorts of sub-classing "issues" with 2.0 which is really frustrating because I only use subclassed stuff in my apps.
>
>>I had an idea, but am scratching it.
>>
>>
>>>I have subclassed the TabPage control (see code further down). This code worked just fine in VS2003, but in VS2005 it doesn't work as expected (i.e. my tabpages are not red)
>>>
>>>OK here is my code for my subclassed tabpage:
>>>
>>>using System;
>>>using System.Collections;
>>>using System.ComponentModel;
>>>using System.Drawing;
>>>using System.Windows.Forms;
>>>
>>>namespace WindowsApplication19
>>>{
>>>	class myTabPage : System.Windows.Forms.TabPage
>>>	{
>>>		private System.ComponentModel.IContainer components = null;
>>>		>		public override Color BackColor
>>>		{
>>>			get { return base.BackColor; }
>>>			set { ;	}
>>>		}
>>>
>>>		public myTabPage()
>>>		{
>>>			InitializeComponent();
>>>			base.BackColor = Color.Red;
>>>		}
>>>
>>>		protected override void Dispose( bool disposing )
>>>		{
>>>			if( disposing )
>>>			{
>>>				if (components != null)
>>>				{
>>>					components.Dispose();
>>>				}
>>>			}
>>>			base.Dispose( disposing );
>>>		}
>>>
>>>		private void InitializeComponent()
>>>		{
>>>			this.SuspendLayout();
>>>			this.ResumeLayout(false);
>>>		}
>>>	}
>>>}
>>>
>>>
>>>(someone might feel the need to comment that I should not make the backcolor bright red, but this is simply an example <s>)
>>>
>>>Any clue about what I am doing wrong?
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform