Continuing the saga of creating a nice looking list with icons… and there are probably lots of good reasons to not approach it this way - feel free to express those thoughts…
I have a database with user info, one field is a text description which could be any length.
Method 1: I have experimented with expressing this list of descriptions in a canvas, using the g.drawstring command in the paint event of the canvas.
Method 2: I have also defined a picture property § and expressed the text using p.graphics.drawstring…
In method 1 - the text is updated as I scroll through the database (using verticalscrollbar and code to do so) - however, it doesn’t take long for the program to crash this way - I am suspecting some sort of overload condition that is difficult to recreate in a simple test app without a database. I introduced a timer to do the repaint after things settle down from the scrolling (say refresh after waiting a second) - but it still crashes.
In method 2 - once I render the first image in the canvas (g.drawpicture p,0,0) in the canvas paint event, I can not seem to get the picture to update when I re-render p, and refresh the canvas - instead the canvas goes blank.
If instead (since I am creating a picture - p) I use a WebImageView and just re-assign WebImageView.Picture = p after every time I re-render the list in p, everything seems to work just fine - it just feels a bit less responsive than Method 1 and the WebCanvas - if only that method didn’t crash.
Any comments or insights on best approach for mixing text from a database and small images in a list like fashion without using 3rd party controls?