Paintable Canvas not refreshing Image

I am having issues with the display of a paintable canvas object. I am bringing in a BLOB image from a database. I am running into issues with the image refreshing.

My code is all stored in the repaint event handler. I believe that the data is coming in for the updated image but the object itself is not refreshing. If I resize the window it shows the correct image or if I hover over the paintable object and a dialog box appears when I move the mouse away the correct pixels are shown only where the box was.

Refresh of the paintable canvas is triggered by any event that triggers a propertyChange. You should not do any calls to your gateway in the paint event (you risk a locked UI). Use binding to bring the blob data to a custom dataset property on the paintable canvas, and have the paint event get its image data from that property. That hits two birds with one stone: avoid UI lockups, and provides a propertyChange that will trigger refresh.


Thanks for the help! I found an older post where you described the same thing. That worked!