|
-
March 17th, 2004, 12:16 PM
#1
Listview + focus
Hi
When i select a row in the listview, and i typ a value in a textbox on the form my focus is "lost" in the listview. However, if i do mylistview.selectedrow ... i still see that the row is selected ... how can i solve this little problem?
Greetings,
Jay
-
March 17th, 2004, 01:01 PM
#2
Hi there;
I have been toiling with the beloved listview over the past 4 months in my project (I really dig this control) - Question: Is the problem this? - when the listview loses focus, is the selected row not visible? If not, try setting the FullRowSelect property to true in the properties window. This is how I got around it - and when the listview loses focus, the selected row appears gray, but still selected and visible to the user. Let me know if your scenario differs.
-
March 17th, 2004, 01:09 PM
#3
Hi
That property is already set on true.
But i totally don't see the selection (not even gray).
I know it "selects" the row but doesn't show it. Why? Because i have a field where i can type the number of articles. When i type the number in that field and i press add, the "selected" article is added. (but you don't see the selection)
Greetings,
Jay
-
March 17th, 2004, 01:18 PM
#4
Hmmm....not sure what is going on. If possible, please provide some code.
-
March 17th, 2004, 01:24 PM
#5
Well, there isn't much of code.
When the users clicks the button to add the article to his personal list of articles, then this code is executed:
Call InsertArtikel(lstAlleArtikels.SelectedItem.Tag, txtAantal.Text)
txtAantal.Text = ""
Call FillPersonalList
But this code is only executed when the users presses the button. If i type in a textbox certain text on the same form, the focus is already lost. So code posting has no influence here
Is there anyway to leave the focus on that row in the listview?
Greetings,
Jay
-
March 17th, 2004, 01:53 PM
#6
Hi there;
Well, I just ran my project and went to a spot where I also have a text box with a listview. I selected a row, then clicked on the textbox, and the row went from blue to gray. So I backtracked a bit (I set these listviews up a few months ago!) and rechecked some of the properties and remembered! I also had to set the property 'HideSelection' to false - could that be it!?
-
March 17th, 2004, 02:02 PM
#7
Yes yes yes. This was the problem. Now it is indeed grayed. This is good enough. The user just didn't know which row was selected (now that it is grayed, he can know)
Thanks ALOT!! Ahara for all the efforts (including making a new project)
Lots of greetings,
Jay
-
March 17th, 2004, 02:08 PM
#8
[RESOLVED]
My pleasure! It was good for me to review! Cheers
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|