Page 1 of 1

List Control: Selecting a specific row

Posted: Wed Apr 06, 2011 11:15 am
by Steve Horn
OK, I tried to search for "List Control" with this phpBB forum sw "search" function. Worthless. The words "List Control" are too common. Tried other searches ("List", "Control",...) also to no avail. :x
And at the risk of having my name appear on virtually all the forum subjects on the index page :oops: , here goes...
Is there a way to select, via vb script, task, or other programming means, a specific row in a list control's displayed list? The only way I see how to do it is via mouse/screen poke or other manual means. In its simplest implementation, I'd like to have 2 button controls (up+down) that would allow the user to step up and down the list, then when the desired entry is found, have another button control used to select (change property) that entry, similar to the click or double click. What I'm finding in using tablets for swremotes is that selecting via list controls tends to be awkward when no keyboard or mouse is in place. And depending upon the type of tablet, a finger poke (inaccurate) or even stylus (cumbersome) are not very effective.

Re: List Control: Selecting a specific row

Posted: Thu Apr 07, 2011 2:17 pm
by Richard Naninck
You could search for:
Alphalist and *S-

Maybe this will help:?

http://cebotics.com/forums/viewtopic.ph ... S+#p445900

Re: List Control: Selecting a specific row

Posted: Thu Apr 07, 2011 5:33 pm
by Steve Horn
Richard, thanks I'll look into it. I had tried searching using "*S-", thinking that was what I needed. (I had seen that in your vbs code as well as the Jukebox code, but needed to read more.) Sadly, I found the search facility useless using that string too. BTW, I also searched thru the HB Help file. No help.

Re: List Control: Selecting a specific row

Posted: Fri Apr 08, 2011 1:27 pm
by Osler
Steve:

You won't be able to highlight as you scroll the list (this would require you to rebuild the list and append the next item with *S- with each down or up button push). I mean, you could do this, but I am not sure it would be visually appealing or as responsive as you'd like.

In order to keep the scroll bars from appearing (which are useless on small screens when you have large fingers), I only display a portion of the main list on the screen at a time. The size of the list that is displayed is determined by trial and error on your screen so that the most items can be displayed without causing the scroll bars to appear. I then use nice big buttons for scrolling that, when pushed, will load the previous or next items (say 20) from the main list. If you keep track of where in the main list your sub list is, you can use this information to visibly display a scrollbar for visual representation of how far down the list you are with a gauge control (i.e., if the list is 100 entries and you are displaying entry 20-40, you could set your gauge control to show 60% remaining).

This is how I have scrolling set-up for going through music on my Sonos system. It works well on a 7" 800 x 600 CuWin display. You can see an example in this image:

Image

The only other option would be to go into your settings for Windows and increase the size of the system scrollbars.

Osler

Re: List Control: Selecting a specific row

Posted: Sat Apr 09, 2011 8:46 am
by Steve Horn
Osler, thanks; that's what I was thinking - the way it would have to work. The lists I currently have (in Jukebot) have the page up/down code built in but it has never worked and I had not had time to investigate. I just scrolled. either with the scroll bar or by moving the selection bar thru the list. I guess I need to get into it and get up/down to work and according to the size of my screens.