When I place an Ultraformattedlinklabel on a form and set Autosize to True then the text disappears. I am using version 10.1.20101.1007
Is this normal behavior?
Hello,
Please let us know if you need any further assistance.
Yes I need some assistance, I installed the latest release but i still have the problems. They are more complex as i ealier mentioned. I attached a project with the problem.
The project contains 2 usercontrols one with the labelcontrol and the other with the formattedlinklabelcontrol. I expect that both behave the same, but as you can see after adding a text the ultraformattedlinklabel disappear.
The usercontrol is a breadcrumb control where you can add more "levels" to it.
It uses a tablelayoutpanel, where the columns are autosize and the (formattedlink)label is docked to Fill and is autosized.
You can see the strange behavior of the formattedlinklabel in the design mode of the usercontrol. Select the tasklist of the ultraformattedlinklabel1 and toggle the autosize and wraptext options randomly and the text is disappearing and showing.
In designmode of the mainform, you can resize the usercontrol of ultraformattedlinklabel1 and the text is gone.
I hope i was clear in explaning en reproducing my problem.
Has this problem been resolved yet?
I am on version 2011.2 and still happening. Any work around?
Thanks.
Hi Kevin,
It does not look like this issue was fixed. There appears to have been some trouble reproducing the issue after the initial try.
I tried it out just now using the sample posted here with v11.2 and I can get the issue to occur every time. I will ask Infragistics Developer Support to write this up for further review.
In any case, the problem here seems to be the result of some very unusual, and contradicatory, property settings. The sample here is setting AutoSize on the UltraFormattedLinkLabel to true and also set Dock to Fill.
These properties are in direct contradiction of each other. AutoSize tells the control to size based on it's contents and DockStyle.Fill tells it to fill the container it's in. It cannot possibly do both.
Of course, the control should not be going blank. That's a very unintuitive response and doesn't make any sense.
But since these property settings make no sense, anyway, you can easily work around the problem by either setting the Dock property or the AutoSize property but not both. AutoSize seems to be the more logical setting in this case.
Hi Mike,
Thank you for your quick response. Although the underlying cause might be the same, in my case, I am not setting the dock property of the label. I am creating the labels at run-time and adding them to a Table Layout Panel. Setting the dock property of the label to none has no effect as should be expected.
In case it helps anybody, here is how I got it to work:
1.- Store the value of the label in the tag property
2.- When the form resizes, find all the labels in the form and reset their text and value properties.
Private Sub DoLabelFix(ByVal Ctls As Control.ControlCollection)
For Each ctl As Control In Ctls
If ctl.HasChildren Then DoLabelFix(ctl.Controls)
If TypeOf ctl Is UltraFormattedLinkLabel Then
Dim lbl As UltraFormattedLinkLabel = ctl
lbl.Text = lbl.Text 'Redraws text on the label but makes it lose any formatting
lbl.Value = lbl.Tag 'Restores the formatting
End If
Next
End Sub
Not ideal but it works for now. Hopefully this will be resolved soon J
If you are not setting the Dock property, then you may not be experiencing the same issue that was reported here. Can you post a small sample project demonstrating your issue? It would be a shame if the issue reported here was fixed and it did not correct the issue you are having.
Sample project attached. Thank you.
Hello Kevinsaucier,
I have created two separate cases for you : CAS-84845-3G3ZTB and CAS-84849-0LMMGS.
I will update you through them accordingly with our progress.
If you have any other questions with this matter please feel free to let us know here or through your cases.
Hi,
I'm not sure if this is the same issue. I will let Developer Support know and ask them to write this up separately.
But both issues appear to be directly related to the TableLayoutPanel control. I suspect this may be a problem with that control.
Perhaps you could use UltraGridBagLayoutPanel or UltraFlowLayoutManager instead.