Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.

Tooltip body not updating

Hi team

I've never used the tooltip like this before, so maybe it's not something introduced in 3.1.1

I have the same edittable mentioned in the last post (https://forum.srpcs.com/discussion/354/inability-to-edit-a-cell-on-the-first-or-new-table-row#latest). When I click on the "Avail" column (9) the commuter should display a tooltip showing the available stock breakdown, generally a few lines long e.g. as per sample code below. The cell Protection is 'Selectable'

This works fine on the first occasion for me, however on subsequent clicks (whether the tooltip has disappeared or not) the main body of the tooltip doesn't change/update? The title does update correctly though. I tried using a yield() before re-display of the tooltip and calling OLE.HideBalloonTooltip before it, but this didn't make a difference.

Any suggestions appreciated. Please let me know if you need anymore info.

// OnClick event for the grid click_product_grid: clickpos = param1 convert ';' to @fm in clickpos col_no = clickpos<1> row_no = clickpos<2> Begin Case case col_no = skn_image_pos$ open_window_flag = true$ gosub preview_image case col_no = skn_avail_pos$ gosub show_colour_size_details end case return show_colour_size_details: // some demo code tooltip_details = '' no_of_skus = row_no + 2 avail_qty = 0 for i = 1 to no_of_skus this_avail_qty = i + 4 tooltip_details<i> = ' ':this_avail_qty :' Some Description ':i avail_qty += this_avail_qty next i convert @fm to @tm in tooltip_details tooltip_title = avail_qty:' Remaining' visible_seconds = 5 tooltip_config = '' tooltip_config<1> = tooltip_details tooltip_config<2> = tooltip_title tooltip_config<3> = 0 ;* info tooltip_config<4> = visible_seconds * 1000 send_message(ctrl_products$, 'OLE.ShowBalloonTooltip', clickpos, tooltip_config) return

User: James Birnie

Comments

  • So far I can't repeat the behavior. When I run your sample, the tooltip changes each time. I'm testing on Windows 8. What OS are you testing on? I tested both SRPEditTable.ocx 3.0.5 and SRPControls.ocx 3.1.1. According to your post, you seem to be on the latest OCX (SRPControls.ocx 3.1.1).
  • Hi Kevin

    Thanks for the reply. I am using Windows 7, OI 9.3.1, running the form as an MDICHILD if that makes any difference.

    I added this change just before I left work yesterday and noticed I had to click on the cell twice for it to update (after the first showing), so put a yield() immediately before in the code and it then seemed to be consistent. Then when I got home I tested it again (remotely) and it didn't seem to be updating for subsequent requests again. I'm heading to work soon and will re-test + let you know the results.

    Now that we are finally on 3.1.1 I'll re-test that MouseOut re: panel also and let you know.

    User: James Birnie
  • Hi Kevin

    It's reasonably consistent for me (sorry its not 100%) i.e. the body part of the tooltip does not update on subsequent clicks - particularly initially. Once a cell has previously displayed the correct tooltip (e.g. due to 2-clicks trick below), then it seems to be a bit more consistent in subsequently re-updating correctly.

    Also on the 3rd edittable column (skn), when I enter an invalid entry (using the BeforeUpdate event) I display an error tooltip message. Similarly the title always updates correctly, however the body displays whatever was shown previously also (e.g. an invalid product message, or list of available qtys via the previous code). So this issue isn't related to the "OnClick" event for me.

    Interestingly re: the avail qtys (click) tooltip, if I re-click the same cell, then the tooltip *does* update the body correctly. So I tried calling the send_message(ctrl_products$, 'OLE.ShowBalloonTooltip'... twice + with a yield() or delay() inbetween, however this doesn't change the result on the first click.

    e.g. in the pic below, the tooltop body comes from a previous invalid SKN entry (col 3), and is not related to a list of different product qtys:


    User: James Birnie
Sign In or Register to comment.