Text Entry / Scrolling Dilema
-
OK...so since no one answered, my communication skills must be at fault...let me try again please... I am trying to add radio buttons to a panel that are outside the normal panel size. I know that it will scroll during runtime and in the past I have used cut and paste to accomplish this, but the question is how do I add the control into the panel in the first place since the panel cannot be expanded during development? I hope someone can see through this to understand the problem. Thanks for the time...Pat previously I wrote: Good Morning...perhaps it's been too long between programs...but... I am trying to create a page that has a panel inside a tab control. In the past, it seems I used the panel control to allow scrolling, but previously I never had any controls on the panel that needed to be added that were outside the panel area. I know that I can create text and paste it in and it will scroll automatically, but what if I need to add controls (in this case radio buttons) and those controls are outside the entry range on the development page? There does not seem to be any way to add to the panel once you have reached the bottom...or is there? I am using Visual Studio 10. Thank you for your help....Pat
-
OK...so since no one answered, my communication skills must be at fault...let me try again please... I am trying to add radio buttons to a panel that are outside the normal panel size. I know that it will scroll during runtime and in the past I have used cut and paste to accomplish this, but the question is how do I add the control into the panel in the first place since the panel cannot be expanded during development? I hope someone can see through this to understand the problem. Thanks for the time...Pat previously I wrote: Good Morning...perhaps it's been too long between programs...but... I am trying to create a page that has a panel inside a tab control. In the past, it seems I used the panel control to allow scrolling, but previously I never had any controls on the panel that needed to be added that were outside the panel area. I know that I can create text and paste it in and it will scroll automatically, but what if I need to add controls (in this case radio buttons) and those controls are outside the entry range on the development page? There does not seem to be any way to add to the panel once you have reached the bottom...or is there? I am using Visual Studio 10. Thank you for your help....Pat
WinForms .NET 4.0, VS 2010 Pro SP1 1. Create a WinForm project 2. Make the initial default Form1 800x600 3. put a TabControl on it: size it to taste 4. select any TabPage you've added (or one of the default two that are automatically created when you add the TabControl to the Form): a. set the AutoScroll property of the selected TabPage selected to 'true b. insert a Panel in the selected TabPage: set its Location to 0,0, and size to 1000x800: Discussion: even with the Panel 'AutoScroll property set to 'false (in case you thought that that was a factor here): you can still scroll the TabPage at design-time and put Controls anywhere on the Panel. But, you may notice a weird graphic hiccup that I consider a bug in WinForms: the bounding area of the Panel may appear to extend to the left of the TabControl in a way that has obviously nothing to do with the settings of the Panel: but, this has no effect on your ability to use the larger-than-TabControl Panel at design-time. Also, if you copy and paste a Control which has been sited (for example at the right edge of your big Panel), you may be surprised the pasted Control appears outside the current viewport: but it's there and you may have to scroll around to find it and move it. Also, I think, a bug in WinForms. Although, to give the benefit of the doubt: is there any code of etiquette about what's supposed to happen when you copy and paste Controls in a container in terms of "placement" ? :) I remember when I tried to do this once that I thought setting the Anchor property of the Control that was in the big Panel to 'Right would make the inserted Control "snap" to the right side of the big Panel, even if it was out-of-view at run-time: wrong. In your case since you are using RadioButtons, and presumably are using them all in one container so that only one of them is "on" at any one time: why not just create some Panel or GroupBox or whatever, then site that where you need it to be in the big Panel, and then put all the RadioButtons in that ?
"I have always wished for my computer to be as easy to use as my telephone; my wish has come true because I can no longer figure out how to use my telephone." Bjarne Stroustrop circa 1990
-
WinForms .NET 4.0, VS 2010 Pro SP1 1. Create a WinForm project 2. Make the initial default Form1 800x600 3. put a TabControl on it: size it to taste 4. select any TabPage you've added (or one of the default two that are automatically created when you add the TabControl to the Form): a. set the AutoScroll property of the selected TabPage selected to 'true b. insert a Panel in the selected TabPage: set its Location to 0,0, and size to 1000x800: Discussion: even with the Panel 'AutoScroll property set to 'false (in case you thought that that was a factor here): you can still scroll the TabPage at design-time and put Controls anywhere on the Panel. But, you may notice a weird graphic hiccup that I consider a bug in WinForms: the bounding area of the Panel may appear to extend to the left of the TabControl in a way that has obviously nothing to do with the settings of the Panel: but, this has no effect on your ability to use the larger-than-TabControl Panel at design-time. Also, if you copy and paste a Control which has been sited (for example at the right edge of your big Panel), you may be surprised the pasted Control appears outside the current viewport: but it's there and you may have to scroll around to find it and move it. Also, I think, a bug in WinForms. Although, to give the benefit of the doubt: is there any code of etiquette about what's supposed to happen when you copy and paste Controls in a container in terms of "placement" ? :) I remember when I tried to do this once that I thought setting the Anchor property of the Control that was in the big Panel to 'Right would make the inserted Control "snap" to the right side of the big Panel, even if it was out-of-view at run-time: wrong. In your case since you are using RadioButtons, and presumably are using them all in one container so that only one of them is "on" at any one time: why not just create some Panel or GroupBox or whatever, then site that where you need it to be in the big Panel, and then put all the RadioButtons in that ?
"I have always wished for my computer to be as easy to use as my telephone; my wish has come true because I can no longer figure out how to use my telephone." Bjarne Stroustrop circa 1990
Thank you Bill, Sometimes I AMAZE myself...how could I have missed something as basic as a property setting. I guess I can't see the forest through the trees. BTW...that works perfectly and solves my problem. I appreciate your time and input and am marking this reply as a correct answer. Best Regards, Pat