Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
195
ComboBox vs. ComboBoxEditor
posted

Hi,

I am trying to determine the best control to use in my scenario.  I have tried both controls mentioned in the subject, but usually come across some caveat I don't like, unless of course I'm mistaken.

 For example I really like the way the ComboBoxEditor behaves.  I like the fact GUI looks prettier.  By that, I like how when I mouse over an item, it highlights that row with the pretty Office 2007 style.  Something I can't seem to do in the ComboBox.  However in the ComboBox I can have multiple columns that the user can stretch so that if the text is too big he can still read it.  This is something I can't seem to do in the ComboBoxEditor.

Is there some way to have one of the controls perform this:

  • Highlight the entire row when i mouse over the selection.
  • When it highlights it can use the Office 2007 style on it.
  • Have the drop down list multiple columns.
  • Have those columns be stretchable by the user.

Thank you in advance! 

Parents
  • 37774
    Verified Answer
    posted

    It sounds like the UltraCombo has everything that you want except for the built-in resolution for the Office2007 hot-tracking.  You can achieve a look that is very close to the UltraComboEditor's hot-tracking by setting the HotTrackRowAppearance, such as the following:

    private void ultraCombo1_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e)
    {
        e.Layout.Override.HotTrackRowAppearance.BackColor = Infragistics.Win.Office2007ColorTable.Colors.ButtonHighlightGradientDark;
        e.Layout.Override.HotTrackRowAppearance.BackColor2 = Infragistics.Win.Office2007ColorTable.Colors.ButtonHighlightGradientLight;
        e.Layout.Override.HotTrackRowAppearance.ForeColor = Infragistics.Win.Office2007ColorTable.Colors.ButtonForeColorHighlight;
        e.Layout.Override.HotTrackRowAppearance.BackGradientStyle = Infragistics.Win.GradientStyle.GlassTop50Bright;
        e.Layout.Override.HotTrackRowAppearance.BorderColor = Infragistics.Win.Office2007ColorTable.Colors.ButtonHighlightBorderGradientDark;
        e.Layout.Override.HotTrackRowAppearance.BorderColor2 = Infragistics.Win.Office2007ColorTable.Colors.ButtonHighlightBorderGradientLight;
    }

    This will not be exactly the same as the UltraComboEditor's hot-tracking because the ValueListItems custom-draw their borders to have a 1px inner border (Office2007 buttons will do the same thing), but otherwise these are the same colors used in the resolution of the UltraComboEditor's items.

     -Matt

Reply Children
No Data