Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

A little tooltip question

Posted on 1999-07-07
10
Medium Priority
?
483 Views
Last Modified: 2010-05-18
I'm using MSFlexGrid control and trying to show various tooltips depending on cell which is under the mouse pointer. Some cells are empty and shouldn't have tooltip.
And now - the problem. When mouse is moving from non-empty cell to an empty one, the old tooltip stays visible. If I try with setting the ToolTipText property to "" in the case of empty cell, an ugly little "box" (empty tooltip, I supose) apears in that moment.
Is there way of turning off tooltip text exept by setting its property to ""?
How to solve this?

Apolo.
0
Comment
Question by:ekc
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 2
  • 2
  • +1
10 Comments
 

Expert Comment

by:NiTech
ID: 1522527
. tooltiptext = null ?


Nit
0
 
LVL 5

Author Comment

by:ekc
ID: 1522528
"Run time run-time error 94: Invalide use of Null"
Nice try NiTech...

Apolo.
0
 

Expert Comment

by:pakos
ID: 1522529
. tooltiptext = Nothing



0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 5

Author Comment

by:ekc
ID: 1522530
Pakos,
is that some kind of joke?

Apolo.
0
 

Expert Comment

by:MCANNON
ID: 1522531
Not sure what version you are using.
Microsoft Hierarchical FlexGrid Control v6.00.8418 as included with VB6 SP3 does not do this.
Upgrade?

VB6SP3 Example:

Private Sub MSFlexGrid1_EnterCell()
    With MSFlexGrid1
        .ToolTipText = "At " + Str(.Row) + ":" + Str(.Col)
        If .Row = 3 And .Col = 3 Then
            .ToolTipText = ""
        End If
    End With
End Sub


0
 
LVL 5

Author Comment

by:ekc
ID: 1522532
MCANNON, Enter_Cell event triggers on change of the active cell. ToolTip shows when mouse pointer is over cell, not when cell is active.
Except that, you're using .ToolTipText = "" , which I told creates little box this question is here because of.
0
 

Expert Comment

by:pakos
ID: 1522533
i tried this on on a label :
and it worked

Text1.ToolTipText = Text1.Text

donnu about MSFlexGrid1, it should be something like this.

and sorry about last time = nothing...

0
 
LVL 5

Author Comment

by:ekc
ID: 1522534
Problem remains. I have that stupid little box again. Obviosly it represents "". Maybe it's not so easy to get rid of it. When you try with textbox you don't have same problem because when you exit editbox, there is no need of showing tooltip. I have to deal with situation of empty cell.
Thanks anyway...

Apolo.
0
 

Accepted Solution

by:
MCANNON earned 160 total points
ID: 1522535
This was not obvious from your question.
Upon investigation it is quite obviously a bug in the object and a private flag that is not being reset, as if you monitor the problem when the object looses focus the little box problem is reset.

Below is a frig, but it works by causing focus to shift for a bit...

Private Sub MSFlexGrid1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    With MSFlexGrid1
        .ToolTipText = Str(.MouseCol) + ":" + Str(.MouseRow)
        If .MouseCol > 3 Then
            Form1.SetFocus
            .ToolTipText = ""
        End If
    End With
End Sub



0
 
LVL 5

Author Comment

by:ekc
ID: 1522536
That's it! Thanks MCANNON, you've got the points.

Apolo.
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

704 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question