Linda,
>>>I am trying to create a class based on the mmTextBox class. I created a new class of UserControl, added the OakLeaf.MM.Main.Windows.Forms namespace and changed the parent class to mmTextBox. I then tried to change several properties, such as BackColor, Font, etc. I get an error when I compile indicating that the properties are readonly. How do I need to go about this? The code I tried is below. Thanks.
>>>
>>>
>>> public partial class EditStatusTextBox : mmTextBox
>>> {
>>> public EditStatusTextBox()
>>> {
>>> InitializeComponent();
>>> this.Text = "View";
>>> this.BackColor.R = 255;
>>> this.BackColor.G = 255;
>>> this.BackColor.B = 128;
>>> }
>>> }
>>>
>>
>>Try to set them through extra properties.
>
>Naomi,
>I don't know what you mean by that. I can't imagine how I would set up a new property for a font style or BackColor, since there are already properties with those names.
You cannot set these properties this way apparently. You can however set the BackColor property other ways like this:
this.BackColor = Color.Red; a named color. Or:
this.BackColor = Color.FromArgb(255,255,128);
Tim
Update: The help file for VS confirms the .R, .G, .B properties are read only.
Timothy Bryan