Esempio n. 1
0
        /// <summary>Creates the tool tip information.</summary>
        /// <returns>A <see cref="ToolTipControlInfo"/> object.</returns>
        public virtual ToolTipControlInfo CreateToolTipInfo()
        {
            var title = "DxUltimate - RichToolTip Demo";
            var tip   = new SuperToolTip();

            tip.Items.AddTitle(title);
            tip.Items.AddSeparator();

            var descItem = tip.Items.Add("System specifications");

            descItem.ImageOptions.SvgImage = null;
            if (descItem.ImageOptions.SvgImage != null)
            {
                descItem.ImageToTextDistance = 8;
                descItem.Appearance.TextOptions.VAlignment = VertAlignment.Center;
                descItem.ImageOptions.SvgImageSize         = new Size(32, 32);
            }

            var cells = new string[this.list.Count, 3];

            for (int i = 0; i < this.list.Count; i++)
            {
                cells[i, 0] = this.list[i].Col1;
                cells[i, 1] = this.list[i].Col2;
                cells[i, 2] = this.list[i].Col3;
            }

            var richItem = new RichToolTipItem();

            richItem.MaxWidth = 600;
            richItem.Appearance.Assign(this.defaultToolTipController1.DefaultController.Appearance);

            richItem.LeftIndent = 8;
            var appearance = richItem.GetPaintAppearance();
            var rtf        = RichTextTableBuilder.CreateTable(cells, appearance);

            richItem.Text = rtf;

            tip.Items.Add(richItem);
            tip.MaxWidth = 600;

            var info = new ToolTipControlInfo(this.simpleButton1, title);

            info.SuperTip         = tip;
            info.ImmediateToolTip = true;

            return(info);
        }
Esempio n. 2
0
        /// <summary>Creates the tool tip information.</summary>
        /// <returns>A <see cref="ToolTipControlInfo"/> object.</returns>
        public virtual ToolTipControlInfo CreateToolTipInfo()
        {
            var title = "DxUltimate - RichToolTip Demo";
            var tip   = new SuperToolTip();

            tip.Items.AddTitle(title);
            tip.Items.AddSeparator();

            var richItem = new RichToolTipItem();

            richItem.Text = this.richEditControl1.RtfText;
            tip.Items.Add(richItem);

            var info = new ToolTipControlInfo(this.simpleButton1, title);

            info.SuperTip         = tip;
            info.ImmediateToolTip = true;

            return(info);
        }