horizontal scroll

7 posts, 1 answers
  1. iramz
    iramz avatar
    23 posts
    Member since:
    Jan 2010

    Posted 06 Apr 2010 Link to this post

    hi,

    how do i make the horizontal scroll show up in the drop down panel when the selection item is longer than the width of  the ComboBox control? Currently the panel just adjust its length making it longer than the actual control's length.

    thank u!
  2. Konstantina
    Admin
    Konstantina avatar
    2332 posts

    Posted 08 Apr 2010 Link to this post

    Hello iramz,

    Thank you for contacting us.

    Attached you will find a sample project in which this is illustrated. I have set the Width property of the Grid which is in the Popup in order to fix the length of the items, because as you said, it adjusts its length.
    Please mind for the "NOTE:" comments which indicate the place where changes have been made.

    Let us know if you need further assistance.

    All the best,
    Konstantina
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. iramz
    iramz avatar
    23 posts
    Member since:
    Jan 2010

    Posted 08 Apr 2010 Link to this post

    great thanks. i somewhat get the idea. but for the grid area, say i want the width to be the same as the combobox instead of just setting it to 100? how do i do that? template binding?
  4. Answer
    Konstantina
    Admin
    Konstantina avatar
    2332 posts

    Posted 09 Apr 2010 Link to this post

    Hello iramz,

    Thank you for your question.

    Attached you will find the sample project with some corrections made. Again, please mind for the "NOTE:" comments. Generally, this is not a recommended way of binding.

    If you have further questions please feel free to ask again.

    All the best,
    Konstantina
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  5. iramz
    iramz avatar
    23 posts
    Member since:
    Jan 2010

    Posted 11 Apr 2010 Link to this post

    wow this works amazing! thank a lot solves my problem. just one last question though, not really good with using templates, but how can i still do this and the combobox still follow my theme? can i omit the hard coded values in your static resource?
  6. iramz
    iramz avatar
    23 posts
    Member since:
    Jan 2010

    Posted 12 Apr 2010 Link to this post

    this worked for me.

    public override void OnApplyTemplate()  
            {  
                AddHorizontalScrollToDropDownArea();      
                base.OnApplyTemplate();  
            }  
     
    private void AddHorizontalScrollToDropDownArea()  
            {  
                Popup popup = GetTemplateChild("PART_Popup"as Popup;  
                FrameworkElement popupContent = popup.Child as FrameworkElement;  
                if (popupContent != null) popupContent.Width = this.Width;  
                ScrollViewer scrollViewer = GetTemplateChild("PART_ScrollViewer"as ScrollViewer;  
                if (scrollViewer != null) scrollViewer.HorizontalScrollBarVisibility = ScrollBarVisibility.Auto;  
            }  
       
       
             
  7. Konstantina
    Admin
    Konstantina avatar
    2332 posts

    Posted 14 Apr 2010 Link to this post

    Hello iramz,

    Glad that you have found solution yourself.

    If you have any other questions please feel free to ask again.

    Regards,
    Konstantina
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Back to Top