示例#1
0
        public static Pango.EllipsizeMode ToGtkValue(this EllipsizeMode value)
        {
            switch (value)
            {
            case Xwt.EllipsizeMode.None: return(Pango.EllipsizeMode.None);

            case Xwt.EllipsizeMode.Start: return(Pango.EllipsizeMode.Start);

            case Xwt.EllipsizeMode.Middle: return(Pango.EllipsizeMode.Middle);

            case Xwt.EllipsizeMode.End: return(Pango.EllipsizeMode.End);
            }
            throw new NotSupportedException();
        }
        public static void SetElipsize(this ComboBox combo, EllipsizeMode mode = EllipsizeMode.End)
        {
            if (combo == null || combo.Cells.Length == 0)
            {
                return;
            }

            CellRendererText cellRendererText = combo.Cells [0] as CellRendererText;

            if (cellRendererText == null)
            {
                return;
            }

            cellRendererText.Ellipsize = mode;
        }
示例#3
0
 public static extern string gtk_progress_bar_set_ellipsize(IntPtr progressBar, EllipsizeMode mode);