/// <summary>
        /// Gets the list view width large enough to handle the longest completion data
        /// text string.
        /// </summary>
        /// <param name="defaultWidth">The default width of the list view.</param>
        /// <param name="height">The height of the list view.  This is
        /// used to determine if the scrollbar is visible.</param>
        /// <returns>The list view width to accommodate the longest completion
        /// data text string; otherwise the default width.</returns>
        int GetListViewWidth(int defaultWidth, int height)
        {
            float width = defaultWidth;

            using (Graphics graphics = _completionListView.CreateGraphics())
            {
                int imageWidth = _completionListView.ImageWidth;
                for (int i = 0; i < _completionData.Length; ++i)
                {
                    float itemWidth = imageWidth + graphics.MeasureString(_completionData[i].Text, _completionListView.Font).Width;
                    if (itemWidth > width)
                    {
                        width = itemWidth;
                    }
                }
            }

            float totalItemsHeight = _completionListView.ItemHeight * _completionData.Length;

            if (totalItemsHeight > height)
            {
                // Compensate for scroll bar.
                width += _scrollbarWidth;
            }
            return((int)width);
        }