disable a listview item

Answered
0
0

Ciao,

I have a list of items (as from attached files) in a listview. Is it possible to disable an item?

Grazie,

Alessandro.

Attachment
  • You must to post comments
Best Answer
0
0

Ciao Messere,

It looks like with your application you have a few options…

You can set the “Selected” property of each ListViewItem to False in a handler (SelectedIndexChanged or similar). You would probably want to have different images for a disabled state. The downside of this option is you’ll still have the focus indicator around the item and have to manage the logic for the disabled state.

 

Another option would be to use a FlowLayoutPanel or FlexLayoutPanel with three buttons in it. The Wisej.Web.Button control has the “Enabled” property that would provide the exact behavior you’re looking for. You can play around with the FillWeight and FlowBreak properties to achieve the sizing and layout you want.

 

My recommendation would be to use the FlowLayoutPanel with the buttons in conjunction with a custom Mixin (see https://docs.wisej.com/theme-builder/getting-started/edit-a-mixin). With the mixin you can define a custom look for each state (disabled, hovered, etc.) of the button.

 

I’ll look into adding an Enabled or Selectable property for the ListViewItem. It might be something we want to add.

 

HTH,

Levie

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.