Although I know much more about StarBasic than I do about VB.NET, I am working a project in VB.NET. I decided that I wanted to provide edit controls in a ListView. The easy solution is to set the LabelEdit property to true and then in a double click handler (or similar), you add code like this.
.IntroductionIn Windows programming, ListView is a great control! Especially with the variety of views it supports. But alas, the original ListView control suppliedby Visual Studio is very limited and its endless possibilities cannot be exploited without going through core level programming. Editing the text in the columnsof the ListView control is one of the difficult tasks that one has to do to allow such basic facility to end-users.BackgroundThe basic need of many programmers of ListView control is to allow users to edit the content of the control during runtime by end-users.ListView however only allows the first column to be edited in the 'Detailed' view. What about other columns?There are many off-the-shelf free controls available on the internet that allow great facilities and bend the limits of the ListView control.
IrishEddy 28-Jul-16 1:3628-Jul-16 1:36The author's implementation is great, but as you can see from the comments, there are problems with this approach (the text box editor should be scrolled together with the ListView, we need to provide a keyboard interface to access any subitem to edit and the like). You may need this editing functionality in several ListView's in your app, so you will either copy this editing framework code for every ListView or write a custom control that wraps the ListView editing functionality. Add to this that ListView has its own set of problems like flickering, no color formatting, no built-in sorting, etc. In many cases, it's much simpler to use a professional and cheap 3rd-party replacement for ListView like iGrid. See this article for more info:Ultimately, you can even earn more if you use such a control as you will avoid many hours of manual coding. I would say its better to let the textbox lose focus.Because even if this subitem editing was a built-in feature, you have to think that this listview control also comprises of further child controls.
The grid is a different control, column headers are different controls, and hence scrollbars are also different controls. So if you shift focus to one control (in this case the scrollbar), it is by nature that the other control should lose focus (in this case the textbox).It would be quite difficult to program the textbox in such a way that it moves along with the scrollbar. Although you can give it a try. There are ways to capture scrollbar movements from a listview control. So you can move the position of the textbox along with the movement of scrollbar.
Resident evil 3 psx. The difficult part would be to show the textbox in half if the scrollbar is in such a position that half subitem is visible. Also there would be a flickering overload to the sytem.Hope it helps.