We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Right-allign the scrollbar in a combobox

Is it possible to right-allign the vertical scrollbar and have the items is a combobox right-alligned at the same time? I've tried the following: private void CurrentCellShowingDropDown(object sender, GridCurrentCellShowingDropDownEventArgs e) { GridCurrentCell cc = slotsGridControl.CurrentCell; GridComboBoxCellRenderer cr = cc.Renderer as GridComboBoxCellRenderer; if(cr != null) { cr.ListBoxPart.RightToLeft = RightToLeft.Yes; } } Here my items are right-alligned, but my scrollbar shown on the left-hand side...

1 Reply

AD Administrator Syncfusion Team July 1, 2003 06:26 AM

If you use RTL with the standard Windows Forms controls like the ListBox which what the dropdown is, then you get the scrollbar on the left. Another possible solution would be to use a GridListControl in a dropdown cell. Then you could handle the QueryCellInfo event of the embedded grid and set the Horizontal alignment there. Attached is a sample that does this in Form_Load. If you have several GridListControl cells using different datasources, you could use the CurrentCellShowingDropDown and CurrentCellCloseDropDown to dynamically hook and unhook the particular eventhandlers you need to control the looks for each of the different datasources.

Loader.
Live Chat Icon For mobile
Up arrow icon