public void SetPrompt(Control c, string value) { if (c == null) { throw new ArgumentNullException(); } if (!CanExtend(c)) { throw new ArgumentException("Control must be derived from TextBoxBase"); } if (String.IsNullOrEmpty(value)) { _extendees.Remove(c); } else { if (_extendees.ContainsKey(c)) { _extendees[c].Prompt = value; } else { _extendees[c] = new PromptPainter(c, value); } } }
public void SetPrompt(Control c, string value) { if (c == null) { throw new ArgumentNullException(); } if (!CanExtend(c)) { throw new ArgumentException("Control must be derived from TextBoxBase"); } if (String.IsNullOrEmpty(value)) { _extendees.Remove(c); } else { if (_extendees.ContainsKey(c)) { _extendees[c].Prompt = value; } else { _extendees[c] = new PromptPainter(c, value); } } }