In Winforms RadRadioButtonElement inside the WrapLayoutPanel Panel is not rendered right

1 Answer 40 Views
Top achievements
Rank 1
Pugal asked on 11 Aug 2023, 09:04 AM

I need to display a list of radio button elements, for that I did is created a rad panel, inside the rad panel I added a WrapLayoutpanel, Inside that I added the list of RadRadioButtonElement, The problem I am facing is if the court of the RadRadioButtonElement increases the text are truncated, It works in bigger resolution but not in smaller one, I kind of figure out if the width of the RadRadioButtonElement is greater than the text are not rendered right.

Sample code

 Private _WindowsControl As Control

Private _RadioButtonPanel As RadElement


Public Overrides Sub SetupUIElements()
        Me.TitlePanel.Margin = New Padding(0005)
        Dim minSize As New Size(5050)
        Dim radPanel = New RadPanel() With
                .AutoSize = True,
                .MinimumSize = minSize
        radPanel.PanelElement.PanelBorder.Visibility = ElementVisibility.Collapsed
        _RadioButtonPanel = New WrapLayoutPanel() With
                .AutoSize = True,
                .AutoSizeMode = RadAutoSizeMode.WrapAroundChildren,
                .Orientation = Orientation.Vertical,
                .StretchHorizontally = False,
                .StretchVertically = False
        _WindowsControl = radPanel
        For Each attrValue As StudyAttributeValue In Attribute.Values
            Dim radioButton = New RadRadioButtonElement() With
                    .Padding = New Padding(20000),
                    .Text = attrValue.Description,
                    .IsChecked = attrValue.Selected,
                    .AutoSize = True
            AddHandler radioButton.Click, AddressOf ValueChangedEventHandler

End Sub


 Private Sub Parent_SizeChanged(sender As Object, e As EventArgs)
        Dim parent As Control = DirectCast(sender, Control)
        If _WindowsControl IsNot Nothing Then
            Dim minSize = parent.Size
            minSize.Height -= TitlePanel.Size.Height
            minSize -= New Size(100100)
            _WindowsControl.MinimumSize = minSize
        End If

End Sub


This is an issue in production, and I need help resolving this, Please advise




1 Answer, 1 is accepted

Sort by
Dinko | Tech Support Engineer
Telerik team
answered on 15 Aug 2023, 01:09 PM

Hi Pugal,

Thank you for the provided code snippet.

To better understand the described behavior is it possible to share image of what is not working. Also, can you modify the attached project which I created using the code snippet. The RadioButtons are added but I am not sure how to proceed from here. By smalled resoltution did you mean HDPI? Can you what is the resolution of the monitor on wich the form appear?

Any other information will be highly appreciated.

Dinko | Tech Support Engineer
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Asked by
Top achievements
Rank 1
Answers by
Dinko | Tech Support Engineer
Telerik team
Share this question