I have just modified a property page so that each UltraTabPageControl has AutoScroll set to True.
The width of all textboxes with scroll bars has now changed so that the right-hand edge is way off the screen. If I manually resize the textboxes and then lock them, as soon as I run my app the widths change again, even though the controls are locked. Sometimes the width stays the same
This means that when running the app I can never see the textbox scroll bars, because they are always off the edge of the screen
Any ideas?
Regards
Hello,
Please let me know if this is is still outstanding and have any questions regarding my prevous post.
Hi Michael
It's very easy to reproduce. In the attached project when you open the form you will see that the textbox control is locked and its width is greater than the form. Before I ran the application the textbox was narrower than the form.
You might be wondering why there is a GroupBox on the form. When the user first opens the form it looks like a sheet of paper: white bacjkground with all data displayed as readonly textboxes and/or labels, also with a white background. When the user clicks an edit button all the labels are hidden and replaced by editable controls (calendars, drop-downs, checkboxes etc). The form therefore has pretty much 2 controls for each field. In the designer I do the layout using the labels and readonly textboxes and dump all the editable controls into a GroupBox called "Hidden Control Bag". I drag this off to the right so I can see what the form looks like.
I have included 2 screenshots (locked.jpg and unlocked.jpg) to illustrate why i do this
Thanks
Thank you for following up. I dropped our UltraTextEditor on the form and noticed immediately that it was not behaving like the inbox textbox. I determined that the you have the Anchor property set to Top, Left, and Right for the TextBox which is making it extend the width of the TabPageControl's client area.
If you reset this the Anchor property to it's default the unexpected behavior will disappear.
Let me know if you have any questions regarding this matter.
I need the text box to be anchored as the form is sizeable . The problem goes away if I make sure that the group box fits inside the tab (even if the text box is anchored). I would say this is a bug but I have a work around I can live with it. Thanks
This behavior was also found when using only standard inbox DotNet controls (eg. panel, tabcontrol). This appears to be a limitation as explained in MSDN.
https://msdn.microsoft.com/en-us/library/system.windows.forms.scrollablecontrol.autoscroll%28v=vs.110%29.aspx
I attached a sample where I added a panel to host the controls in the Tab's Client Area. The behavior never occurs. Please review it and let me know if you have any questions.
Thanks very much for your efforts. I have a work around so I'm happy.
Cheers