Doubts About control Panel

05-15-2006, 08:30 AM
hi this is my first message :D and i have somo doubts about control panel.

1. I try to control the scroll of the panel with the wheel of the mouse but i don't know how to do that some one can help???? :(

2. Now i have an aplication that add picture box to a panel dinamic, but when i add a picturebox when the scroll is at the top everithing is ok, but when the user scroll the panel and add a new picturebox, the new picture box is added but not in the position that i want, for example:

i add 10 picture box, the position is something lake this:


when i add other picture box the next position is (10, 510), but when the panel is scrolled the 510 pixels are counted from the top of the panel scrolled but not at the top of the panel position. Someone knows haw can i solve this problem???? :confused:


05-15-2006, 11:29 AM
I've been working on this exact same concept. The first way I solved it was by adding all the items before the panel can ever be scrolled by the user. The second way, which came by luck, was that I would add controls to a panel which was inside of another panel. The outermost panel would have autoscroll enabled, while the inner panel would have autoscroll disabled and just resize to fit whatever controls you added to it.

You could also try setting the autoscrollposition back to zero, adding the control, then returning the autoscrollposition to where it was. Or you could figure out how much to offset the control when you add it by checking the autoscrollposition.

05-15-2006, 11:54 AM
thanks i use the last form that you said, with the autoscrollposition and works OK.

:D :D :D

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum