As the subject indicates, I have a DevComponents DotNetBar ButtonItem on my Windows Form. In that buttonitem I have submenu items. The submenu items coming as drop down from split button has a down arrow only when the height of the submenu reaches the bottom of the window.
I would like to change the submenu items as scrollable list with displaying 10 submenu items with either a scroll on right or down arrow at bottom.
I have tried setting popupcontainer to searchable list that is customised user control but the keyboard up and down is not navigating to the items in the dropdown.
The code I've attempted to use to perform this task:
ButtonItem item = page.MenuManager.GetMenuItem(DynamicTemplateFilterMenuItemName) as ButtonItem; item.PopupType = ePopupType.Container; item.PopupContainerLoad += Item_PopupContainerLoad;
`private void Item_PopupContainerLoad(object sender, EventArgs e)
{
ButtonItem item = sender as ButtonItem;
if (item == null || item.Name != DynamicTemplateFilterMenuItemName)
return;
PopupContainerControl container = item.PopupContainerControl;
SearchableList searchableList = new SearchableList(_page);
foreach (ButtonItem subItem in item.SubItems)
{
if (subItem.Name == "btnManageDynamicTemplateFilters"
|| subItem.Name == "btnDynamicTemplateFilterCount")
continue;
searchableList.AddData(subItem);
}
searchableList.IntializeData();
searchableList.Parent = container;
container.Controls.Add(searchableList);
searchableList.Location = container.ClientRectangle.Location;
container.ClientSize = searchableList.Size;
}`
But this does not support dropdown keyboard down up events, the focus is not being set to the popupcontainer itself
I'd love any tips or suggestions.