Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
But the tooltips are great!
Message
From
30/01/2017 14:26:15
 
 
To
30/01/2017 13:22:22
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2016
Network:
Windows Server 2016
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01647130
Message ID:
01647194
Views:
54
As said the grid.tooltiptext is a bug in vfp9sp2.
in my knowledge , its not solved by vfp team.

instead of wait window you can use in grid.afterRowColChange event
a tooltip appears (but on all column), showing the record selected.
PROCEDURE grid1.AfterRowColChange
		LPARAMETERS nColIndex
		sele yourcursor
		this.activatecell(recno(),ncolindex)
		this.tooltiptext="current record selected= "+trans(recno())
	ENDPROC
you can try the grid. gridhitTest method maybe can help you :
CLOSE DATABASES all
Public oForm
oForm  = Createobject('myForm')
oForm.Show

Define Class myForm As Form
  DataSession = 1
  Height = 400
  Width=600
  ShowTips = .T.

  Procedure Load
  close data all
 sele * from home(1)+"samples\data\customer" into cursor ycurs
  Endproc

  Add Object myGrd As Grid With RecordSource = 'ycurs',;
    left = 10,Top=10,Height=380,Width=580,anchor=15,;
    Highlight=.F.,HighlightRow=.F.
  Add Object myContainer As Container With ;
    left = 10,Top=10,Height=360,Width=580, BorderWidth=0,BackStyle=0
  Add Object myLbl As Label With ;
    backcolor=Rgb(0,255,0),Visible=.F.,AutoSize = .T.

  Procedure myGrd.Init
    This.SetAll('enabled',.F.)
    This.SetAll('disabledforecolor',0)
  Endproc

  Procedure myContainer.MouseMove
    Lparameters nButton, nShift, nXCoord, nYCoord
    Local lcTip
    With Thisform.myGrd
      Store 0 To nWhere_Out , nRelRow_Out , nRelCol_Out , nView_Out
      If .GridHitTest(nXCoord, nYCoord, ;
          @nWhere_Out, @nRelRow_Out, @nRelCol_Out) And nWhere_Out = 3
        .ActivateCell(m.nRelRow_Out, m.nRelCol_Out)
  try      
        With .Columns(.ActiveColumn)
          lcTip = ;
            iif(Type(.ControlSource)='C',  "Record:"+trans(recno())+"  "+Eval(.ControlSource),;
            iif(Type(.ControlSource)='M',  "Record:"+trans(recno())+"  "+ Mline(Eval(.ControlSource),1)+'...',''))
lcTip=lcTip+"-----"+  "Row="+TRANSFORM(nRelRow_out)+','+TRANSFORM(nRelCol_out)+"....activecolumn=" +  TRANSFORM(thisform.myGrd.activecolumn)+CHR(13)
        Endwith

   catch
   endtry
      Endif
    Endwith
    With This.Parent.myLbl
      .Move(m.nXCoord+16,m.nYCoord+16)
      If !Empty(m.lcTip)
        .Caption = Trim(m.lcTip)
        .Visible = .T.
        If .Left + .Width > Thisform.Width
          .Move(Thisform.Width - .Width - 10,.Top)
        Endif
      Else
        .Visible = .F.
      Endif
    Endwith
  Endproc
  
Enddefine
Previous
Reply
Map
View

Click here to load this message in the networking platform