Author | Topic: Create baloon tooltip, how to | |
---|---|---|
Jack Duijf | Create baloon tooltip, how to on Fri, 31 May 2019 17:40:09 +0200 Hello, On MSDN, i found the code below. I want to create a nice Baloon tooltip for my Xbase++ aplication. Escpecialy for xbpBrowse,and a xbpStatic Is there som Xbase++ coe to do this? hwndToolTips = CreateWindow(TOOLTIPS_CLASS, NULL, WS_POPUP | TTS_NOPREFIX | TTS_BALLOON, 0, 0, 0, 0, NULL, NULL, g_hinst, NULL); if (hwndTooltip) { TOOLINFO ti; ti.cbSize = sizeof(ti); ti.uFlags = TTF_TRANSPARENT | TTF_CENTERTIP; ti.hwnd = hwnd; ti.uId = 0; ti.hinst = NULL; ti.lpszText = LPSTR_TEXTCALLBACK; GetClientRect(hwnd, &ti.rect); SendMessage(hwndToolTips, TTM_ADDTOOL, 0, (LPARAM) &ti ); } Regards Jack Duijf ------------------------------------------------------------- Also a member off the XXP (http://www.xxp.nl) | |
Jim Lee | Re: Create baloon tooltip, how to on Sat, 01 Jun 2019 21:48:59 +0200 hi, > Is there som Xbase++ coe to do this? it is easy to create a native Tooltop but i'm not sure if it work with Xbase++ while you need a Member "Tooltip" ! it work with XbptoolbarButton and XbpStatusbar. they have a Member "Tooltip" but they are activeX (need M$ComCtl.OCX) XbpWindow() also have a iVAR "Tooltip" ... so you can try to access it. neverless it need a seperate (GUI) Thread to run a native Control you have to syncronize with you XbpBrowse() which ist NOT a Windows Control --- Diese E-Mail wurde von AVG auf Viren geprüft. http://www.avg.com | |
Martin Altmann | Re: Create baloon tooltip, how to on Sun, 02 Jun 2019 19:39:27 +0200 Jack, just look at :ShowBalloonTip() in the Alaska Help (and :cueBanner) Best regards, Martin ______________________________ Deutschsprachiges Xbase-Forum: http://www.xbaseforum.de/ ______________________________ | |
Jim Lee | Re: Create baloon tooltip, how to on Sun, 02 Jun 2019 22:16:41 +0200 > just look at :ShowBalloonTip() in the Alaska Help (and :cueBanner) most XbParts have o:tooltipText from XbpWindow() which is used by Sample CLASS MagicHelp() ( \Source\samples\solution\TOOLTIP\Tooltip.prg ) as i say the Problem is the Xbase++ Way to "sync" Mouse moving and Thread. Windows Control react on "hover" and start a Timer before Thread but XbPart have "hover" only as visual Style. --- Diese E-Mail wurde von AVG auf Viren geprüft. http://www.avg.com | |
Jack Duijf | Re: Create baloon tooltip, how to on Sun, 07 Jul 2019 16:29:38 +0200 Hello To all, I managed to have a balloon tooltip in my app, on any type of control. In the end, it was quite simple. 1. Create a xbpSle on your dialog, and hide it . ::oBalloon := xbpSle():New() ::oBalloon:Create(oDlg,,{0,0},{0,0}) ::oBalloon:Hide() 2. If you want to show the ballontip, set position of the sle, and show the balloon tip. (No need to show the xbpSle) cHeader := "Tooltip header text" cText := "First line of tooltip." + Chr(13) cText := "Second line of tooltip." + Chr(13) cText := "Last line of tooltip." ::oBalloon:SetPos({nx,ny}) ::oBalloon:ShowBalloonTip(XBP_TIPINFO,cHeader, cText) 3. If you want to remove the tooltip,. ::oBalloon:HideBalloonTip() Thats all. Regards Jack Duijf ------------------------------------------------------------- Also a member off the XXP (http://www.xxp.nl) |