Click to See Complete Forum and Search --> : DrawLine in multiple Panels
Marlen
September 16th, 2005, 07:28 AM
Hi,
I'm creating several panels runtime in a for loop, I add controls on each panel, I need to draw lines inside each panel(I fill 2 arrays of points to draw the lines), I'm using drawline in the paint event of my panels. During the Paint I see the lines but after finishing the lines stop showing, any help?
Marlen
September 16th, 2005, 07:37 AM
the Paint event is fired once and my arrays are empty in the last run of the for loop. How can I make the Paint event fire more than once. or make
panel1.createGraphics(mypen, array1(i),array2(i)) actually draw during the for loop. This whole process is done in my form load event.
TSmooth
September 16th, 2005, 11:47 AM
You can force a Paint event by calling the Form's Update() method at any time. Hopefully that is the information you need.
RobDog888
September 16th, 2005, 01:44 PM
Instead of the .Update method you can also use the controlname.Invalidate(). This will invalidate a specific region of the control and causes a paint message to be sent to the control. The .Update method causes the control to redraw the invalidated regions within its client area.
Marlen
September 19th, 2005, 04:40 AM
Thanks,
my MAIN problem was that I had put my code in the Form.Load
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.