J
Jeff Johnson
[This isn't really a C# question, but the IDE group is all but dead, so I'm
crossposting....]
I have a user control that should only accept fixed-width fonts for its Font
property. If the user tries to assign a proportional font, I want to return
an error. This works fine for code, but if the user sets the font via the
Properties window in the IDE, my error ("throw new Exception(<blah>)") locks
the IDE up solid. I want it to work more like, for example, when you try to
set the (name) property of a control to something invalid. A little message
box pops up telling you that the "Property value is invalid" or words to
that effect. Any idea how to do that?
crossposting....]
I have a user control that should only accept fixed-width fonts for its Font
property. If the user tries to assign a proportional font, I want to return
an error. This works fine for code, but if the user sets the font via the
Properties window in the IDE, my error ("throw new Exception(<blah>)") locks
the IDE up solid. I want it to work more like, for example, when you try to
set the (name) property of a control to something invalid. A little message
box pops up telling you that the "Property value is invalid" or words to
that effect. Any idea how to do that?