GetDisplayWidget() public method

Displays the property's current value. Default implementation is simply ToString().
public GetDisplayWidget ( ) : Gtk.Widget
return Gtk.Widget
Ejemplo n.º 1
0
        private void DisplayRenderWidget()
        {
            if (propertyValueEventBox.Child != null)
            {
                propertyValueEventBox.Child.Destroy();
            }

            if (editing)
            {
                editing = false;
            }

            Widget displayWidget = editor.GetDisplayWidget();

            propertyValueEventBox.Child = displayWidget;

            if (propertyValueEventBox.Child.SizeRequest().Width > 100)
            {
                propertyValueEventBox.Child.WidthRequest = 100;
                //TODO: Display proper tooltip of full text when truncated
                //if (propertyValueEventBox.Child is Label)
                //	parent.tooltips.SetTip(propertyValueEventBox.Child, ((Label) propertyValueEventBox.Child).Text, string.Empty);
            }

            propertyValueEventBox.ShowAll();
        }