Text cutting off

7 posts, 1 answers
  1. Robert
    Robert avatar
    4 posts
    Member since:
    Feb 2011

    Posted 19 Jun 2014 Link to this post

    The text for my selected items in a MultiColumn ComboBox are getting cut off.  I had a similar problem with the DropDownList control.  To fix that problem, I set the SelectionLength = 0 after assigning the SelectedValue.
  2. Dess
    Admin
    Dess avatar
    1601 posts

    Posted 24 Jun 2014 Link to this post

    Hello Robert,

    Thank you for writing.

    We had a known issue in our RadDropDownList related to cutting off the text. This issue was already fixed in Q3 2013 and it is not reproducible in the latest version.
    Similar problem was available in the RadMulticolumnComboBox. However, its fix was introduced in Q1 2014 SP1.
    I would like to note that both of the issues can not be replicated in the latest release - Q2 2014.
    Here is a sample code snippet, demonstrating how to avoid the undesired behavior for previous versions:
    public Form1()
    {
        InitializeComponent();
        List<Item> items = new List<Item> { new Item(1, "Soooome veeeeeery looong text") };
        this.radDropDownList1.DataSource = items;
        this.radDropDownList1.DisplayMember = "Name";
        this.radDropDownList1.ValueMember = "Id";
     
        this.radMultiColumnComboBox1.DataSource = items;
        this.radMultiColumnComboBox1.DisplayMember = "Name";
        this.radMultiColumnComboBox1.ValueMember = "Id";
    }
     
    public class Item
    {
        public int Id { get; set; }
     
        public string Name { get; set; }
     
        public Item(int id, string name)
        {
            this.Id = id;
            this.Name = name;
        }
    }
     
    protected override void OnLoad(EventArgs e)
    {
        this.radDropDownList1.SelectionLength = 0;
        this.radMultiColumnComboBox1.MultiColumnComboBoxElement.SelectionStart = 0;
         
        base.OnLoad(e);
    }

    If it is not suitable for your specific case, please specify which version you use. Thank you in advance.

    I am looking forward to your reply.

    Regards,
    Desislava
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Robert
    Robert avatar
    4 posts
    Member since:
    Feb 2011

    Posted 24 Jun 2014 in reply to Dess Link to this post

    I'm using Q2 2013.  I got your solution working for simple cases, but I'm still running into problems. 

    I have a button on pageView1 that sets the selected value of a  multiColumnComboBox on pageView2.  If I click on the button and then go to pageView2, the text is cut off.  If I click on pageView2 before clicking on the button, the text is fine. 
  5. Answer
    Dess
    Admin
    Dess avatar
    1601 posts

    Posted 26 Jun 2014 Link to this post

    Hello Robert,

    Thank you for writing back.

    When the RadMulticolumnComboBox is not present in the selected page, it is possible to reproduce the problem with the specified version. However, if you call the RadMulticolumnComboBox.LoadElementTree method on my end after populating the RadMulticolumnComboBox with data, the issue is not reproducible.
    public Form1()
    {
        InitializeComponent();
     
        List<Item> items = new List<Item> {
            new Item(1, "Soooome veeeeeery looong text"),
            new Item(2, "Second veeeeeery looong text") };
        this.radMultiColumnComboBox1.DataSource = items;
        this.radMultiColumnComboBox1.DisplayMember = "Name";
        this.radMultiColumnComboBox1.ValueMember = "Id";
     
        this.radMultiColumnComboBox1.LoadElementTree();
    }
     
    public class Item
    {
        public int Id { get; set; }
     
        public string Name { get; set; }
     
        public Item(int id, string name)
        {
            this.Id = id;
            this.Name = name;
        }
    }

    I hope this information helps. If you have any additional questions, please let me know.

    Regards,
    Desislava
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
  6. Robert
    Robert avatar
    4 posts
    Member since:
    Feb 2011

    Posted 26 Jun 2014 in reply to Dess Link to this post

    That did it.  Thanks you.
  7. Catalin
    Catalin avatar
    18 posts
    Member since:
    Jun 2008

    Posted 23 Feb 2015 in reply to Robert Link to this post

    Hi,

    After calling LoadElementTree(), the RadMultiColumnComboBox displays the left side of the text.

    Playing with the focus on this control will actually modify this behaviour, please see the attached capture.

    Actually, I can’t find a way to display the left side of the content when no focus on the combo.

    Thanks for your help,
    Catalin

     

    PS: version
    Q3 2014 (2014.3.1202.40).
  8. Dess
    Admin
    Dess avatar
    1601 posts

    Posted 26 Feb 2015 Link to this post

    Hello Catalin,

    Thank you for writing.

    Your question has already been answered in the support thread you have opened on the same topic. However, I am posting the answer here as well in order the community to benefit from it.

    This problem is already logged in our feedback portal. You can track its progress, subscribe for status changes and add your vote/comment to it on the following link - feedback item

    Currently, the possible solution that I can suggest is to use the Leave event and clear the selection:
    private void radMultiColumnComboBox1_Leave(object sender, EventArgs e)
    {
        this.radMultiColumnComboBox1.MultiColumnComboBoxElement.TextBoxElement.TextBoxItem.SelectionLength = 0;
    }

    I hope this information helps. Should you have further questions, I would be glad to help.
     
    Regards,
    Dess
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top
UI for WinForms is Visual Studio 2017 Ready