Live resize image while window resizing = true

  1. 7 months ago

    I have a listbox that displays thumbnails of photos that are drag/dropped into the first column:

        // add thumbnail
        imageFrame = new Picture(175, 175)
        dim thumbnail as Picture = GenerateThumbnail(openFile, 175)
        dim x as Integer = (imageFrame.Width / 2) - (thumbnail.Width / 2)
        dim y as Integer = (imageFrame.Height / 2) - (thumbnail.Height / 2)
        imageFrame.Graphics.DrawPicture(thumbnail, x, y)

    As a user resizes the window to his/her liking, the images become stretched.
    I know I can easily solve this by not allowing them to resize the window, but I dislike when developers do this unless it's for good reason.
    How can I have the thumbnails dynamically resize while the window is being resized?

  2. ::EDIT::
    This is a project I'm coming back to after a few months removed...
    I forgot that I had set column widths onOpen, and had set a few column widths using the *.
    So I simply took that off of the first column and fixed my issue.

or Sign Up to reply!