开发者

How do I allow a “flag” enum to be edited in the WinForm PropertyGrid?

开发者 https://www.devze.com 2023-02-28 02:02 出处:网络
The WinForm PropertyGrid copes well with a standard enum but does does have a built in editor for a flag enum.Someone must have written one, I rather not reinvent the weel.

The WinForm PropertyGrid copes well with a standard enum but does does have a built in editor for a flag enum. Someone must have written one, I rather not reinvent the weel.

I am looking for an editor that puts a checkbox next to each member of the enum so the user can control the m开发者_开发技巧embers that are included. My enum looks like:

  [Flags]
  public enum AutoPricingCalendar
  {
        Sunday = 1,
        Monday = 2,
        Tuesday = 4,
        Wednesday = 8,
        Thursday = 16,
        Friday = 32,
        Saturday = 64,
   }


CodeProject: A UITypeEditor for easy editing of flag enum properties in the property browser

0

精彩评论

暂无评论...
验证码 换一张
取 消