arrange pictures according to panelsize

neversleep

Newcomer
Joined
Feb 21, 2003
Messages
6
Location
Sweden
Hi

I have a scrollable panel that contains tumbnailimages. When I add files to my application these images gets added to the panel in a loop. Their x-position is constant and the y-position increaces with the thumb height in each loop so the thumbs get displayed in a column.
The application is resizeable and so is the panelarea that contains the thumbs. How would I do if I wanted the thumbs to be displayed in as many columns as possible? Does there exist some repaint function that gets called when the panel area gets bigger...or how does it work?
 
I would set the panel's .dock property so that it can be resized automatically along with the form...

Then put in the resize code of the panel:
Visual Basic:
Private Sub Panel1_Resize(blah blah )

  ReArrangeThumbs()

End Sub

and something like the following:
Visual Basic:
Private Sub ReArrangeThumbs()

  'This sub will redraw the thumbnail images based on the current size x & y of the panel object to which they will be drawn...

End Sub
 
Back
Top