Strataframe Listview Questions


Author
Message
Thomas Holste
Thomas Holste
Advanced StrataFrame User (536 reputation)Advanced StrataFrame User (536 reputation)Advanced StrataFrame User (536 reputation)Advanced StrataFrame User (536 reputation)Advanced StrataFrame User (536 reputation)Advanced StrataFrame User (536 reputation)Advanced StrataFrame User (536 reputation)Advanced StrataFrame User (536 reputation)Advanced StrataFrame User (536 reputation)
Group: StrataFrame Users
Posts: 144, Visits: 618
Hi there,

after a while I started working on my new app again and encountered some

problems I can't solve by myself. I started an app which uses the

strataframe listview which really impresses me because of the wonderful

layout/design-options but I got two problems where I  need some help.

At first I'd like to tell you that the listview is populated by adding item with

the listview.items.add-method.

The first problem is, that I can not navigate with the up- and down-keys

through the list. I had a look at your listview-samples, navigating with up-

and down-key doesn't work there too. Am I doing something wrong or do

I have to implement this by myself. If yes, how is this done?

The second problem ist that I haven't figured out yet how to determine

the position within the list which is currently selected. For example say

that the listview has 15 items, how do I determine the selected item?

I checked all properties and their values in the debugger, but haven't

found a way yet.

Thanks a lot for your help and best regards

Thomas
Reply
Thomas Holste
Thomas Holste
Advanced StrataFrame User (536 reputation)Advanced StrataFrame User (536 reputation)Advanced StrataFrame User (536 reputation)Advanced StrataFrame User (536 reputation)Advanced StrataFrame User (536 reputation)Advanced StrataFrame User (536 reputation)Advanced StrataFrame User (536 reputation)Advanced StrataFrame User (536 reputation)Advanced StrataFrame User (536 reputation)
Group: StrataFrame Users
Posts: 144, Visits: 618
Hi there,

I did not give up and this is it what seems to work. I post it in case anyone else wants to use the

statalistview in unbound mode.



If e.KeyCode = Keys.Down Then

   Dim nPos As Integer

   Dim nLast As Integer

   Dim nNext As Integer

   ' Get number of items

   nLast = LV.Items.Count - 1

   ' Get index-position of selected item

   nPos = LV.Items.IndexOf(LV.SelectedItems(0))

   nNext = nPos + 1

   If nLast > -1 And nNext <= nLast Then

      ' Set index to next possible position

      LV.Items.Item(nNext).Selected = True

     ' Ensure that the display "moves" along the index-setting

      LV.EnsureVisible(LV.Items.Item(nNext))

   End If

End If



This is just a first version but it works. If anyone knows problems which could emerge with this kind of code, please tell me.

Best regards

Thomas
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search