Hi,
i have the following Problem:
when i write in the box "b" then is the Focus on the last (see on the Picture 1) row. I Need the focos of the first row (see on the Picture 2)
1 = no 2 = yes
And how i can change the height of the scrollist?
Thank you for your help
Ronald
Hello Mike,
thank you very much.
Your TIP works fine for me.
By
Hi Ronald,
I tried it out with an UltraCombo and now I see the behavior. The combo just scrolls so that the selected item is in view, it doesn't scroll it to the top. I can see how that would be desirable.
But I don't see any really great way to make that happen. You can control the scroll position of the combo very easily by setting the FirstRow property on the RowScrollRegion. But the problem would be detecting when an AutoComplete occurred.
So, for example, you could do this:
private void ultraCombo1_RowSelected(object sender, Infragistics.Win.UltraWinGrid.RowSelectedEventArgs e) { if (null != e.Row) { this.ultraCombo1.DisplayLayout.RowScrollRegions[0].FirstRow = e.Row; } }
The down side of this code is that it will move the selected row to the top every time the value changes. So it applies when you use the arrow keys, which is a little weird. I suppose you could use the KeyUp event, instead and only do this when the key is an alphanumeric.
thank you for your answer.
i have a ultraCombo on the form. Not a Ultra Combo Box. Sorry.
Your Sampel work fine, but i Need this for a ultracombo.
thank you for your help
ronald
I tried to reproduce the behavior you are getting and I could not. When I type a "b" in an UltraComboEditor with similar items, the first matching item is scrolled to the top.
I have attached my sample project here so you can run it and see if you get the same results. Maybe you are using different property settings than I am, but if so, I will need to know what they are in order to try to assist you with this.
Regarding your second question about the height of the scroll list, the simplest thing to do is to set the MaxDropDownItems property on the UltraComboEditor.
Another option would be to set the PreferredDropDownSize property. Or, you could even allow the user to resize the dropdown like so:
this.ultraComboEditor1.ValueList.DropDownResizeHandleStyle = Infragistics.Win.DropDownResizeHandleStyle.VerticalResize;