Hi,
I have scenario auto size label in auto size panel, but label went truncated.
What is wrong?
Please find image attached.
My code:
Public Class CFPanel_AutoSize_TOP_Orange_Closing
Inherits Panel
Public Sub New(InOSTRObjectID As String)
With Me
.AutoSize = True
.Font = New Font(Me.Font.Name, 17, FontStyle.Bold)
.Dock = DockStyle.Top
.HeaderBackColor = CColors.OCOlorLightBlue
.HeaderForeColor = CColors.OCOlorWhite
.ShowHeader = True
.BackColor = Cutils.CInterface.CColors.OCOlorOrange_Total
.Padding = New Padding(3)
.Text = CLocalization.FStrings(InOSTRObjectID)
End With
End Sub
End Class
Public Class CLabelContent
Inherits Label
Public Sub New(InOStrObjectID As String)
With Me
.Font = New Font(Me.Font.Name, 17, FontStyle.Bold)
.Text = CLocalization.FStrings(InOStrObjectID)
.Name = InOStrObjectID
.Dock = DockStyle.Top
.AutoSize = True
.BackColor = CColors.OCOlorLightBlue
.ForeColor = CColors.OCOlorWhite
.CssStyle = “border:1px solid rgb(255,255,255)”
.TextAlign = ContentAlignment.TopLeft
.Padding = New Padding(7)
End With
CobjectsRegister.FAdd(InOStrObjectID, Me)
End Sub
End Class
Hi again.
I just changed font from BOLD to REGULAR and received this (please find an image attached). Why so?
I thing it is good idea to made regular panel work properly with autosize top oriented labels, like in our scenario.
Thank you!
Hi
I apologize for the delay
Attached you can find the sample with changes, commented as “ITG” where the changes were.
The biggest change was the lower panel control by a FlowLayoutPanel control
It happens that a panel cannot have vertical growth capabilities by design, as a flow design does.
But we found a bug in the padding property of a tag, therefore not will work perfectly.
the fix for the label.padding will disponible in the next release.
Regards and happy codding
Please find sample project attached. It is my original project with empty bin folder.
Hi
could be possible that send us a minimal sample project whit the error?
We can´t reproduce it yet 🙁
Best regards
Please login first to submit.