pidog Dataview on demand

  1. 2 months ago

    I have a dataview grid loaded with data on demand, on Windows 10.
    The grid get the data from an array.
    I want to change some data in the grid, how do I refresh the grid properly?
    I changed the value in the arrayx, and called various functions like Redraw, Refresh, InvalidateRow etc., but all end up with the same result, the text is not displayed properly anymore as seen in the picture below.
    What am I doing wrong?

    -image-

  2. jim m

    May 17 Pre-Release Testers, Xojo Pro piDog.com

    How are you adding the data? There are several approaches you could take. Are you using the RowWillRender event to copy the data? or using a DataSource subclass to use the array as storage.

  3. I am using the RowWillRender event.

  4. jim m

    May 17 Pre-Release Testers, Xojo Pro piDog.com

    I'll assume you're following from the demo project.
    If you're doing something like this:

    me.cell(index,0)=arrayx(index)

    Be sure to check that you're assigning a new value to the cell. Something like:

    if me.cellValue(index,0)<>arrayx(index) then me.cell(index,0)=arrayx(index)

    The reason for this is an issue I discovered where you could end up with an infinite refresh loop. I've added code to avoid the issue in the next update.

    The RowWillRender event should be called after InvalidateRow when the view is ready to display the row. If it is not firing then there may be something else going on.

  5. Edited 2 months ago

    The RowWillRender event ist firing fine when I call Redraw() or Refresh() etc., just the font is bad, as seen in my picture. Something is not 100% refreshed, because when I move the Window via mouse outside the Desktop and back, it refresh properly.

    I have to use the RowWillRender on demand thing, because I have array with sometime 5mio. or 10mio. urls in it. I cant set them directly in the grid.

  6. jim m

    May 17 Pre-Release Testers, Xojo Pro piDog.com

    Ok, I see. What scale factor is your system using?

  7. Because its a 4k monitor, I set Windows to 175%
    Strange is, when I load the array and set the grid rows to the number of array entries, all entries are correct displayed the first time, but modifying rows will lead to this strange font issue after that.
    For example, I load 10 urls into the array, and all are correct displayed after I set the linecount to 10 what triggers the RowWillRender event. After that, when I modify for example the text in the 3rd. row and call Redraw, or Refresh, or set linecount, the font is bad.

  8. 8 weeks ago

    I noticed that this issue vanish when I turn HighDPi off (but then all is blurry)

or Sign Up to reply!