views:

2448

answers:

3

I am new to the .Net Compact Framework and have been unable to find an answer via Google. Gasp! Yes, it's true, but that is part of why stackoverflow is here, right?

I have a form that is longer than the screen, so a vertical scrollbar appears as expected. However, this appears to force a horizontal scrollbar to appear as well. (If I scroll to the right, there is nothing visible except white space ... about the size of a scrollbar.)

Is this a "feature" that is unavoidable? Anyone have experience in this area?

A: 

Yes - I've got experience with that - unfortunately it was no different from your own. I've generally avoided scrolling forms and used paging wherever possible on .Net CF. If this is an option for you, I'd recommend it.

I'd assume the scroll bar issue is to do with the form size being fixed to the width of the available screen (regardless of design-time settings) so the introduction of a vertical scroll bar obscures part of the (not needed) full-width form.

Gareth Jenkins
+1  A: 

Place your controls within a panel or equivalent and then reduce the width of the panel by the size of a vertical scrollbar. That means that when the vertical scrollbar appears then it will no longer require the horizontal scrollbar to make up for the lost width that the vertical scrollbar took.

Quibblesome
+1  A: 
Craig Norton