Hi,I use an UltraFormattedLinkLabel to view a list of customers.I set AutoSize = True and ScrollBarDisplayStyle = Automatic. The problem comes when the label shows too many customers for the screen size and activate the scrollbar. The vertical scroolbar takes the space reserved to show customer names and therefore the horizontal scrollbar is activated too, making the names almost unreadable.Here I paste a screen showing the problem. The example shows the string "MY_TEST" repeated every line.I would like the vertical scrollbar space was calculated after the shown text. Is it possible?
Thank you very much!Stefano
stemare said:I would like the vertical scrollbar space was calculated after the shown text. Is it possible?
I'm afraid I don't understand what you mean.The question does not make sense to me. What do you mean by "vertical scrollbar space"?
Hi Mike,
Thank you for the reply and sorry for my bad english.
To make it easier to explain, I'll use some screenshots...
This is what the label looks when I set Autosize = True, ScrollbarDisplayStyle = Automatic and there are only few Items to show, it works fine!
This is what the label looks when I set Autosize = True, ScrollbarDisplayStyle = Automatic and there are many Items to show. The vertical scrollbar is activated making the label text ureadable.
And this is what I would like to obtain:
The problem comes only when there are many items to show and the label size get higher than its available space.
I hope I was clear, thank you.
Stefano
Oh, I see. So you are saying that the AutoSize property is not accounting for the scrollbar. If that's the case, it's clearly a bug. Can you post a small sample project demonstrating this so we can check it out?
Sure, I attached the project to this post.
Thank you.
Hi Stefano,
Thanks for the sample. I see the behavior you describe.
I think this is probably a bug that needs to be handled by the PopupControlContainer. Basically, what happens is that the AutoSize of the FormattedLinkLabel initially sizes the label to a width of 37, so all the text fits, and a height of 2600 - which is bigger than the screen.
When you dropdown the PopupControlContainer, it reduces the height to fit on the screen. This causes the scrollbar to display in the FormattedTextEditor which clips the text. At this point, I'm not sure what should happen. It seems like the FormattedTextEditor should be increasing it's width at this point. It is clearly not doing so, but my guess is that it's because it is now docked to fill the dropdown window.
I guess the PopupControlContainer should be resizing it's width based on the PreferredSize of the control it is containing after it reduces the height. But this could lead to a sort've catch-22 and an infinite loop. So I'm not sure this is a problem that can be solved by the controls.
Anyway, it's something we need to look into, so I am going to forward this thread over to Infragistics developer support and have them write it up for developer review.
Hello Stefano,
I have logged this behavior as a development issue.
Ok, thank you for the info!