>************************************************** >*-- Class: _multitooltip (d:\foxproprojects\vervoerskosten\classes\googlemailcomposer.vcx) >*-- ParentClass: container >*-- BaseClass: container >*-- Time Stamp: 07/11/18 02:35:06 PM >* >DEFINE CLASS _multitooltip AS container > > > Tag = "class made by Benn Kjae" > Width = 48 > Height = 22 > BackColor = RGB(0,0,0) > *-- Specifies the maximum width of MultiTooltip > _maxwidth = 200 > Name = "_multitooltip" > > > ADD OBJECT label AS label WITH ; > FontName = "Tahoma", ; > BackStyle = 0, ; > Caption = "", ; > Height = 17, ; > Left = 1, ; > Top = 2, ; > Width = 22, ; > ForeColor = RGB(255,255,255), ; > Name = "Label" > > > PROCEDURE Destroy > ********************************************************************** > * Program....: _MULTITOOLTIP.DESTROY > * Version....: > * Author.....: Benn Kjae > * Date.......: 11 July 2018, 12:32:40 > * Notice.....: No Copyright © Use at your own risk. > * Parameters.: > * Called by..: > * Purpose....: > ********************************************************************** > With Thisform > If Pemstatus(Thisform,'_MultiLineToolTipActive',5) > ._MultiLineToolTipActive = .F. > ._MouseOverObject = .Name > Endif > Endwith > ENDPROC > > > PROCEDURE Init > ********************************************************************** > * Program....: _MULTITOOLTIP.INIT > * Version....: > * Author.....: Benn Kjae > * Date.......: 11 July 2018, 12:31:40 > * Notice.....: No Copyright © Use at your own risk. > * Parameters.: > * Called by..: > * Purpose....: > ********************************************************************** > > Parameters cToolTipText, nXCoord, nYCoord, cName, nNewMaxWidth > > *-- Change ._MaxWidth for the tooltip box > If Type("nNewMaxWidth") = "N" > If nNewMaxWidth >= 10 > This._MaxWidth = nNewMaxWidth > Endif > Endif > > With Thisform > ._MultiLineToolTipActive = .T. > ._MouseOverObject = cName > Endwith > > With This.Label > .Caption = cToolTipText > > This.Left = nXCoord > This.Top = nYCoord + 17 > > This.Visible = .T. > > *-- Make sure that the label resize to it's max width > .AutoSize = .T. > > *-- Have to wait a moment for the label to be updated > =Inkey(.0001) > > .AutoSize = .F. > > If .Width > This._MaxWidth > .Width = This._MaxWidth - 4 > .WordWrap = .T. > > *-- Make sure that the label resize to it's new size > *-- controled by .Width and .WordWrap > .AutoSize = .T. > .AutoSize = .F. > Endif > This.Width = .Width + 4 > This.Height = .Height + 2 > Endwith > ENDPROC > > >ENDDEFINE >* >*-- EndDefine: _multitooltip >************************************************** > >>