Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFPConversion.com BLOG is now available
Message
 
À
06/06/2005 23:31:50
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
01020508
Message ID:
01021195
Vues:
24
Well, yes, that is true. But this is an extremely simplistic example. And even if your class starts out like this, then it will probably not stay like that.

Example: Change the default font size of your textbox. Just doing that is fairly lengthy...

Markus



>>Bonnie, can you tell me why you see a problem in having base classes in different files? Serious question.<
>
>John,
>
>OK, fair enough ...
>
>In the example I mentioned ... the main sub-class of your basic controls ... TextBox, ComboBox, etc. You'll not have much code in each one of these. I can't see having a whole file for, say, a Label sub-class. Here's our label class:
>
>	public class MyLabel : System.Windows.Forms.Label
>	{
>		public MyLabel()
>		{
>		}
>
>		#region Methods
>		public virtual void DataBind(System.Data.DataTable Data, string Path)
>		{
>			for (int i = 0; i < this.DataBindings.Count; i++)
>			{
>				if (this.DataBindings[i].PropertyName == "Text")
>				{
>					this.DataBindings.Remove(this.DataBindings[i]);
>					break;
>				}
>			}
>			this.DataBindings.Add("Text", Data, Path);
>		}
>		#endregion
>	}
>
>
>I can't justify having one file that contains only that.
>
>~~Bonnie




Markus Egger
President, EPS Software Corp
Author, Advanced Object Oriented Programming with VFP6
Publisher, CoDe Magazine
Microsoft MVP since 1995
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform