none
ListView: HideSelection and Scrollable properties

    Question

  • Hello,

    I have the following problem with the ListView component:

    I have define a ListView with the 'Scrollable' property set to false. And no scrollbars appears.

    At run time, after setting the property 'HideSelection' to true, my ListView object becomes scrollbars.

    Is there an interraction between those two properties.

    This problem occurs only with .Net 2.0. It works fine with 1.1.

    Many thanks in advance for your help.

    Régis

    Thursday, January 12, 2006 1:21 PM

All replies

  • I think there is an inerraction by those two. I don't have 2.0 here, so i can't look under the hood. But does it work when after setting HideSelection to true, set Scollable property to false?
    Thursday, January 12, 2006 2:23 PM
  • The only way to make it running was to set first the Scrollable property to true, change the HideSelection state and then reset the Scrollable property to false.

    It works, but make a redraw of my component. This redraw was not acceptable for me. I have found a work around for my application in setting at the beginning the HideSelection to false and when a need to have no selected item in my ListView, I clear the selected items : myListView.SelectedItems.Clear().

    Régis

    Friday, January 13, 2006 7:44 AM