![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I have a form with listview control. The listview control is populated and sorted in the begining. I want to select and highlight the very first row in lietview control. Unfortunately the following doesn't work: m_FileList->Items->Item[0]->Selected = true ; because Item[0] is not always displayed first. For example if the item array is as follows: Item[0] = "C" Item[1] = "A" Item[2] = "B" Then after initial sorting m_FileList->Items->Item[0]->Selected = true ; statement will highlight third row. So my question is how can I select and highlight the very first row in lietview control? Thanks |
#3
| |||
| |||
|
|
Try with the ListView.TopItem property -- Best regards, Carlos J. Quintero MZ-Tools: Productivity add-ins for Visual Studio .NET, VB6, VB5 and VBA You can code, design and document much faster. Free resources for add-in developers: http://www.mztools.com "Steve" <Steve (AT) discussions (DOT) microsoft.com> escribió en el mensaje news:C6E37701-525C-4D3A-8D29-3FF0408FD954 (AT) microsoft (DOT) com... I have a form with listview control. The listview control is populated and sorted in the begining. I want to select and highlight the very first row in lietview control. Unfortunately the following doesn't work: m_FileList->Items->Item[0]->Selected = true ; because Item[0] is not always displayed first. For example if the item array is as follows: Item[0] = "C" Item[1] = "A" Item[2] = "B" Then after initial sorting m_FileList->Items->Item[0]->Selected = true ; statement will highlight third row. So my question is how can I select and highlight the very first row in lietview control? Thanks |
#4
| |||
| |||
|
|
I don't think your suggestion would work because I only can get ListView.TopItem property value. I can't set it. |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |