Esempio n. 1
0
        protected override IPropertyEditor CreateEditor(Gdk.Rectangle cell_area, Gtk.StateType state)
        {
            if (evtBind == null)
            {
                return(null);
            }

            //get existing method names
            ICollection IColl = evtBind.GetCompatibleMethods(evtBind.GetEvent(Property));

            string[] methods = new string [IColl.Count + 1];
            IColl.CopyTo(methods, 1);

            //add a suggestion
            methods [0] = evtBind.CreateUniqueMethodName((IComponent)Instance, evtBind.GetEvent(Property));

            EventEditor combo = new EventEditor(evtBind, methods);

            if (Value != null)
            {
                combo.Entry.Text = (string)Value;
            }

            combo.WidthRequest = 30;             //Don't artificially inflate the width. It expands anyway.

            return(combo);
        }
Esempio n. 2
0
		protected override IPropertyEditor CreateEditor (Gdk.Rectangle cell_area, Gtk.StateType state)
		{
			//get existing method names
			ICollection IColl = evtBind.GetCompatibleMethods (evtBind.GetEvent (Property)) ;
			string[] methods = new string [IColl.Count + 1];
			IColl.CopyTo (methods, 1);
			
			//add a suggestion
			methods [0] = evtBind.CreateUniqueMethodName ((IComponent) Instance, evtBind.GetEvent (Property));
			
			EventEditor combo = new EventEditor (evtBind, methods);

			if (Value != null)
				combo.Entry.Text = (string) Value;
			
			combo.WidthRequest = 30; //Don't artificially inflate the width. It expands anyway.

			return combo;
		}