Print Page | Close Window

Can ToolTip display more than 15 Lines?

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=3577
Printed Date: 09 November 2025 at 11:42pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Can ToolTip display more than 15 Lines?
Posted By: nguyena1
Subject: Can ToolTip display more than 15 Lines?
Date Posted: 31 January 2006 at 10:29am

Hey there, I'm trying to have my tooltip as a popup status indicator for our project and can't get it to display more than 15 lines?  The width and heigth are dynamically created correctly, just blank after 15 lines.  Any reason why or something to get around this?

void COXToolTipCtrlCustom::DisplayToolTip(CPoint& pt, BOOL bExtended /*= FALSE*/)
{
    CSize szPopup;
 ASSERT(::IsWindow(m_hWnd));
 int nWidth;  //autowidth of popup
 int nHeight;
    if (!m_bActivated || !m_pCurrentToolTip)
        return;

    m_bExtended = bExtended;

    //CString str = GetTooltipText(m_pCurrentToolTip);
    CString str = _T("1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n1 7asdfad\n18\n19\n20");
 if (str.IsEmpty())
        return;
 
    m_wndPopupControl.SetTheme(new CXTPPopupPaintManager());
 m_wndPopupControl.RedrawControl();
 
 //Calculate the width and height of the box dynamically
    CRect rect = GetBoundsRect(str, m_pCurrentToolTip->nWidth);
    rect = CalculateInfoBoxRect(pt, m_pCurrentToolTip, rect);
 
    nWidth = rect.right - rect.left;
 nHeight = rect.bottom - rect.top;
 m_wndPopupControl.AddItem(new CXTPPopupItem(
  CRect(0, 0, nWidth, nHeight), NULL, RGB(255,255,225), 0));
 szPopup = CSize(nWidth, nHeight);

 CXTPPopupItem* pItemText = (CXTPPopupItem*)m_wndPopupControl.AddItem(
  new CXTPPopupItem(CRect(3, 2, 200, 200), _T(str)));

 pItemText->SetHyperLink(FALSE);
 
 m_wndPopupControl.SetPopupAnimation((XTPPopupAnimation )0);
 m_wndPopupControl.SetShowDelay(0);
 m_wndPopupControl.SetAnimateDelay(100);
 m_wndPopupControl.SetTransparency((BYTE)theApp.m_nTool TipTransparency);
 m_wndPopupControl.SetPopupSize(szPopup);
 m_wndPopupControl.AllowMove(0);
 m_wndPopupControl.Show(this);
}




Replies:
Posted By: Oleg
Date Posted: 31 January 2006 at 1:46pm

Hi

Obviously, you need to change height of the item

CRect(3, 2, 200, 200), -> CRect(3, 2, 200, 300)

 

 



-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: nguyena1
Date Posted: 31 January 2006 at 3:20pm
Thanks!



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net