We display variable length text in an UltraFormattedLinkLabel. Each line is terminated with a new line. We have word wrapped turned on so the lines are wrapping, but sometimes we also get a horizontal scroll bar which we don't want. We do want a vertical scrollbar when the text does not fit into the bounds of the label so we do have the ScrollBarDisplayStyle = Infragistics.Win.UltraWinScrollBar.ScrollBarDisplayStyle.Automatic.
The question is, how do we get the vertical scroll bar when it is needed without ever getting a horizontal scrollbar?
Thanks,
Andy
Hello Andrew,
Thank you for contacting Infragistics!
I followed the steps you suggested and was unable to reproduce the behavior you're describing. I created a sample UltraFormmatedLinkLabel and enabled scroll bars and word wrap. It wrapped without issue and only active vertical scrollbars.
I have attached the sample project I used to test this. Please test this project on your PC; whether or not it works correctly may help indicate the nature of this problem.
If the project does not work correctly, then the change in behavior is due to differences in your environment from mine and these differences can be anything from operating system version to the specific version of the Infragistics DLL versions used. My test was performed using version 18.1.20181.177 in Infragistics for WinForms 2018 Volume 1. Please provide more details about your machine and version of the assemblies that you are referencing so that I can modify the environment that I am testing in to match yours.
If the project does show the product feature working correctly, then more information will be needed to reproduce the issue in a sample that can be used for debugging. It will help if you can provide a small, isolated sample application that demonstrates the behavior you are seeing. This can be done by either be done by making the sample that I provided more like your application or by isolating the behavior from your application by removing dependencies on any third parties or databases.
Please let me know if I can provide any further assistance.
UltraFormattedLinkLabel.zip
I guess I should have mentioned that I was able to eliminate the problem by increasing the width of the UltraFormattedLinkLabel so the problem seems to be related to the width of the control. I will try your project and maybe adjust the width of the Label to see if I can reproduce the situation.
Thanks.,