February 3rd, 2013, 06:47 PM
scroll bars on a panel ?
i have setup a mdi parent form with 3 panles on it. one docked to the left , one docked to the right and the third docked as fill to sit inbetween the other two.
i want to display an image on the third panel and have it be scrollable if it is bigger than the panel size. i have tried to get just a single panel on a form, with the panels autoscroll set to true ( and also with the forms autoscroll set to true) and it doesnt want to work , i think i am missing a vital ingredient here.
Can anyone enlighten me ?
I have managed to get the scroll bars to appear in a test i did but when i adjust the scroll bars the image on the panel is getting corrupted. i am not doing anything in the OnPaint and it is not overridden so shouldnt the panle just 'move' within the scroll area. i understand it has to be redrawn, but there is nothing i have done to the redraw method (that i am aware of) that would make it alter the content on the panel.
Could some one provide any code that simply draws say arectangle on a panle and allows it to scroll in a form that is smaller than the panel size.
Click Here to Expand Forum to Full Width