Re: enable/disable buttons based on ListView selection
- From: "Nicholas Paldino [.NET/C# MVP]" <mvp@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 14 Jun 2007 00:19:41 -0400
Brandon,
To be honest, any comparisons to Java are rather moot, as there is are no direct analogies between the model for visual controls there, and those in .NET.
What are the events that you are connecting to in order to determine when to enable/disable the buttons? Also, what mode are you viewing the listview in?
--
- Nicholas Paldino [.NET/C# MVP]
- mvp@xxxxxxxxxxxxxxxxxxxxxxxxxxx
"Brandon McCombs" <none@xxxxxxxx> wrote in message news:4670b15e$0$14936$4c368faf@xxxxxxxxxxxxxxxxx
Hello,
I have a form that contains a listview on the left side and a column of buttons on the right side. Only some of the buttons do I want enabled all the time. The other buttons should be enabled only if something is selected in the listview. That part specifically works but not very well. It seems that I can only get the buttons to disable if I click off the text of the items in the listview but still within about 10-20 pixels of the text. If I click way off to the right where there is still whitespace then I guess it isn't considered a click on the listview and no event is generated to disable the buttons.
In Java, clicking anywhere on a row in a list would register as an event on the list item but it seems with C# the boundary for what is considered the list item seems to be very small (and definitely doesn't extend across the entire width of the listview). By the way, I only have 1 column in the listview and I'm using the list view type (as opposed to details or large icons) if that matters. Any tips?
thanks
.
- Follow-Ups:
- Re: enable/disable buttons based on ListView selection
- From: Brandon McCombs
- Re: enable/disable buttons based on ListView selection
- References:
- enable/disable buttons based on ListView selection
- From: Brandon McCombs
- enable/disable buttons based on ListView selection
- Prev by Date: Re: Easy (?!) regular expression -- find line breaks
- Next by Date: upload a file through a remote web page
- Previous by thread: enable/disable buttons based on ListView selection
- Next by thread: Re: enable/disable buttons based on ListView selection
- Index(es):