Menu

ObjectListView in ToolStrip dropdown

Help
2016-08-18
2016-10-04
  • Brian Buttolph

    Brian Buttolph - 2016-08-18

    Are there any examples on how to add ObjectListView (or another flavor) to a WinForms ToolStrip as a dropdown control similar to a combobox?

    Update: I used the technique from How to load custom controls in the ToolStripDropDownButton DropDown? and created an example by modifying the GettingStartedTree example. When the button in the toolstrip is clicked, the treeview displays fine but positioned at the top-left side of the screen and not as a dropdown. Interestingly, if I remove the call to SetObjects(), the dropdown is positioned correctly with column headers but no data. Anyone have any ideas on how to fix this?

    Thanks,
    Brian

     

    Last edit: Brian Buttolph 2016-08-22
  • Brian Buttolph

    Brian Buttolph - 2016-08-22

    Found the fix as described in ToolStripDropDown renders at position 0,0 on first click . Setting the ToolStripDropDown.Visible property to true solves the problem. Same as the forum moderator, I have no idea why.

     
  • Marius Dagys

    Marius Dagys - 2016-10-04

    There is an example with a combobox in project https://apskaita5.codeplex.com
    See source code Apskaita5\AccControlsWinForms\Controls
    Classes InfoListControl, DataListViewToolstrip and AccListComboBox

     

Log in to post a comment.

MongoDB Logo MongoDB