Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Turning off show tips for a particular object in a form for Foxpro 9 2

Status
Not open for further replies.

lr145

Programmer
May 21, 2008
11
Hi,
I have a grid containing multiple memo fields on a form in Visual Foxpro 9. I have show tips set to true so the contents of the memo fields is displayed whenever the mouse passes over these fields.

The problem is, that I do NOT want the contents of one particular memo in the grid to be displayed, but I do for the others. I tried putting text in the ToolTip text for the text and column property for this memo field, but there was no change, the contents of the memo still displayed and not the text that I entered.

Is there a way to turn off tips for one object, but leave it on for the others?

Thanks.
 
I don't think so.

The normal way to inhibit tips for a single control is to set its TooltipText property to a blank string. But that won't work here, because the "tooltip" you are seeing isn't the normal tooltip. It is a snapshop of the text in the memo field.

So unless someone can come up with something, you're out of luck.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro tips, advice, training, consultancy
Custom software for your business
 
You could try setting ShowTips to .F. in the MouseEnter for that column and to .T. in MouseLeave. It might work.

Tamar
 
Is there a way to turn off tips for one object, but leave it on for the others?

Yes but it involves coding...
Here is how you do it, first the tips have to be shown from a method so create a method in your form call it "Showinfo" put the following code in it:

Code:
Lparameters nButton, nShift, nXCoord, nYCoord
Store 0 To nWhere_Out ,nRelRow_Out, nRelCol_Out, nView_Out
With This
  .GridHitTest(nXCoord, nYCoord,@nWhere_Out,@nRelRow_Out, @nRelCol_Out)
  If nWhere_Out = 3  &&& In a Cell
     .ActivateCell(nRelRow_Out, nRelCol_Out)
     [b]*** put a condition here like value # something
     *** I have used the grid row cannot be 2[/b]		
     If nRelRow_Out # 2
	pocolumn = Evaluate("this.column"+Transform(nRelCol_Out))
	.ToolTipText = Alltrim(Evaluate(pocolumn.ControlSource))
     Else
	.ToolTipText = ""
     Endif
 Else
    .ToolTipText = ""
 Endif
Endwith

Now in the Grids INIT() put the following:
Code:
For Each oColumn In This.Columns
	Bindevent(oColumn,"MouseMove",Thisform,"showinfo")
Endfor

This is to give you an idea on how it can be done, you will have to fine tune or modify to suit your needs
 
oh; this is wrong as this is method in the form:

pocolumn = Evaluate("this.column"+Transform(nRelCol_Out))

change to:

pocolumn = Evaluate("this.grid1.column"+Transform(nRelCol_Out))

grid1 = name of your grid

Sorry...
 
Thank you, Tamar Granor! This worked! Thanks again so much.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top