The ListBox does not appear to support a multi-selection. However one possible alternative that isn’t too painful would be to use the Gridivew and hide its header visibility. Since Gridview supports multiple selections it should do what you want.
SelectedRows will return an int array of the selected rows.
Accessing the values in each cell of the forms.GridView can be done by using the index position of the value in the .DataStore property. e.g. dialog.m_gridview.DataStore[1][2]
I’ve found that there is a Scrollable Class, but I’m having trouble implimenting it. I think it works similarlarly to a Group Box, but when I follow to example for group boxes here I can’t make the example work.
@Alasdair Scollable is a panel that you can place all of your controls in and all of them will scroll together if their height exceeds their parent containers max height. It’s not really what you want in this case.
A simple fix for you is to just define some height value for your gridview. So like self.m_gridview.Height = 200 or whatever you want its max height to be. That will keep it from expanding to fit its collection since the DynamicLayout will let it grow endlessly in height.
@Trav yep scrollable combined with self.m_gridview.Height = 200 works well. I had difficulty attaching the scrollable panel to the ETO but I think I figured it out.
Hello Travis, does this also work in c# (I tried m_gridview.DataStore[1][0] and it gave me an error) ? I need to get the cell value of the selected rows.
thanks again, how can we control events in gridView (if we have a textboxCell, or a ComboBoxCell - and we change its value, how can we compare between the old value and the latest one?)