Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

hi

I have a problem putting ScrollBars on a PictureBox in C#. I used the Dock property to dock the scroll bars on the right and bottom side of the PictureBox but what I got is not what I wanted... I can't explain... See the attachment (JPG pic)...

 

thanks

  • *Gurus*
Posted

You'd have to use nested panels to achieve this with docking. Dock a panel of the right size to the bottom, then another panel the size of the small square to the right of that. You can then put your horizontal scrollbar in the first panel and set its dock to Fill, and your right scrollbar should be just the same.

 

Alternatively, use anchoring. You wouldn't need any nested panels then.

MVP, Visual Developer - .NET

 

Now you see why evil will always triumph - because good is dumb.

 

My free .NET Windows Forms Controls and Articles

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...