List Info

Thread: C-Sharp (C#) Group: New Property in TextBox




C-Sharp (C#) Group: New Property in TextBox
user name
2006-06-05 08:22:22
Hi,
   I have a problem, I want create a new property in the
textbox class,
I have create a new class Status where for each status
(normal, alarm
and warning), the textbox change color of the background. My
class is :

    public class Status: TextBox
    {
        //public Status[]
PropertyTextBox.Properties.Resources { get;
set; }
        private string _status;

        Properties.Settings.ChangeStatus();

        public void ChangeStatus(int sStatus)
        {
           switch (sStatus) {
             case 1: { setStatus("Normal
Status"); }
             case 2: { setStatus("Alarm
Status"); }
             default: { setStatus("Warning
Status"); }
           }
        }

        private void setStatus(string sStatus)
        {
            _status = sStatus;
        }

        public string getStatus()
        {
            return _status;
        }
    }

How can resolve the problem.?????

Pietro Zizzo 
pietro.zizzooperatore.com
http://www.palatinando.com



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "C-Sharp (C#)" group.
To post to this group, send email to C_Sharpgooglegroups.com
To unsubscribe from this group, send email to
C_Sharp-unsubscribegooglegroups.com
For more options, visit this group at http://groups.
google.com/group/C_Sharp
-~----------~----~----~----~------~----~------~--~---

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )