c# - Property Grid -- Editor ellipsis dont show with a dropdown list -
in property grid, have implemented property both stringconverter display list of values , uitypeeditor open form editing.
each work separately. however, when put both of them together, stringconverter , uitypeeditor, dont see ellipsis edit property. ellipsis hidden below arrow of dropdown.
any idea?
code below -- if helps
[editor(typeof(videodeviceeditor), typeof(uitypeeditor))] [typeconverter(typeof(videodeviceslist))] public class videodevices { } public class videodeviceslist : system.componentmodel.stringconverter { public override system.componentmodel.typeconverter.standardvaluescollection getstandardvalues(itypedescriptorcontext context) { channelpropertyconfiguration inst = (channelpropertyconfiguration)context.instance; list<string> lgs = new list<string>(); lgs.add("microsoft life cam"); lgs.add("logitech web cam"); return new standardvaluescollection(lgs); } public override bool getstandardvaluessupported(itypedescriptorcontext context) { return true; } public override bool getstandardvaluesexclusive(itypedescriptorcontext context) { return true; } } public class videodeviceeditor : uitypeeditor { public override uitypeeditoreditstyle geteditstyle(itypedescriptorcontext context) { return uitypeeditoreditstyle.modal; } public override object editvalue(itypedescriptorcontext context, system.iserviceprovider provider, object value) { iwindowsformseditorservice svc = provider.getservice(typeof(iwindowsformseditorservice)) iwindowsformseditorservice; if (svc != null) { messagebox.show("ok"); } return value; } }
Comments
Post a Comment