Cell HelpTag doesn't disappear

Hi,

I’m using below code to show HelpTag, and it works well.

  'Cell HelpTag
  Dim text As String = Me.Cell( row, column)
  If g.StringWidth( text ) > g.Width Then
    If Me.CellHelpTag( row, column ) = "" Then _
    Me.CellHelpTag( row, column ) = text
  Else
    Me.CellHelpTag( row, column ) = ""
  End If

The problem is that it doesn’t disappear when I client other area of Application. Only after shutdown the App, I don’t see that.
Do you think there is any workaround to disappear it when mouse is out of the Cell?

This sounds like a bug as I use similar techniques with r2. I would suggest filing a feedback report.

I also see this in Xojo IDE. Sometimes tags are shown when hoovering over something and the tag just keeps displaying until you change from editor to code editor (or the other way around). So not only for the Listbox.

BTW OSX

[quote=211634:@changwon lee]Hi,

I’m using below code to show HelpTag, and it works well.

  'Cell HelpTag
  Dim text As String = Me.Cell( row, column)
  If g.StringWidth( text ) > g.Width Then
    If Me.CellHelpTag( row, column ) = "" Then _
    Me.CellHelpTag( row, column ) = text
  Else
    Me.CellHelpTag( row, column ) = ""
  End If

The problem is that it doesn’t disappear when I client other area of Application. Only after shutdown the App, I don’t see that.
Do you think there is any workaround to disappear it when mouse is out of the Cell?[/quote]

Don’t see that on Mac with 2015R2.4. Would you be using Windows ?

OK. On Windows, the problem manifests if other cells have no help tag. You want to make sure all cells have a help tag.

You should file a bug report.

Ok. Thank you.
I’m using Windows.

I will contact Support and submit a sample project.

I haven’t gotten any feedback from Support, so I was wondering if anyone knows about this issue and solution.

If that is not fixed in a Product, do you have any idea to work around it?
I am just thinking to make a method to run below code whenever I move to other screen, but it doesn’t look good.

For all rows in listbox
listbox.CellHelpTag( row, column ) = ""
Next

Thanks.

I suppose this code is in the CellTextPaint event of a listbox.
do you continue the event to the rest of the class ?

' continue celltextpaint Return CellTextPaint( g, row, column, x, y)

Yes, there is the code in CellTextPaint event of a listbox.
Only that code in the event.

May I ask what do you mean?

do you return a value from the method ? you must return true if you handle the event
try return true, or false to see if the helptag disappears.
I have the same code as you except the line I mentionned above, and the tag dissapears after some seconds.

There is no ‘Return’ code.

By the way, when I put ‘Return True’ code there, I can’t see any data in Listbox.
There is no other event in the Listbox.

Do you know what I missed?

  'Cell HelpTag
  Dim text As String = Me.Cell( row, column)
  If g.StringWidth( text ) > g.Width Then
    If Me.CellHelpTag( row, column ) = "" Then _
    Me.CellHelpTag( row, column ) = text
  Else
    Me.CellHelpTag( row, column ) = ""
  End If
  
  Return True

http://documentation.xojo.com/index.php/ListBox.CellTextPaint

Returning true tells Xojo you’re going to handle it. The listbox is empty because you told Xojo you’ll draw the text.

My bad. little bit confused.

Then, should I populate listbox in CellTextPaint event?

If you implement CEllTextPaint AND return true then you’ve literally told the listbox “do not draw whatever cell text there is as I have already done that for you so there’s nothing for you to do”

Ok. I see.

There is a method to populate the Listbox and of course the Listbox has that CellTexPaint event including ‘CellHelpTag’ code.
Can you let me know how to populate data? I am not sure if I should put the method in CellTextPaint event or not.

How can anyone implement CellHelpTag?

I will try that though.