Quantcast
Channel: HTML Renderer
Viewing all articles
Browse latest Browse all 693

New Post: htmltooltip size

$
0
0
ArthurTep wrote:
will be fixed in next minor release.

as a quick fix you can change the set of ToolTipSize in HtmlToolTip.OnToolTipPopup method to:
//Set the size of the tooltip
e.ToolTipSize = new Size((int)Math.Ceiling(Math.Min(_htmlContainer.ActualSize.Width, MaximumSize.Width)),
                                     (int)Math.Ceiling(Math.Min(_htmlContainer.ActualSize.Height, MaximumSize.Height)));
Does not work for me, because MaximumSize can be 0, so Size will be 0 x 0.

Small modification:
            //Set the size of the tooltip
            var desiredWidth = (int)Math.Ceiling(MaximumSize.Width > 0 ? Math.Min(_htmlContainer.ActualSize.Width, MaximumSize.Width) : _htmlContainer.ActualSize.Width);
            var desiredHeight = (int)Math.Ceiling(MaximumSize.Height > 0 ? Math.Min(_htmlContainer.ActualSize.Height, MaximumSize.Height) : _htmlContainer.ActualSize.Height);
            e.ToolTipSize = new Size(desiredWidth, desiredHeight);

Viewing all articles
Browse latest Browse all 693

Trending Articles