forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Jump to item in table?

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
NathanH
Valued Newbie


Joined: 05 Sep 2001
Posts: 32

PostPosted: Thu Jun 23, 2005 5:41 pm    Post subject: Jump to item in table? Reply with quote

Using VDS5 I have a table with 300 items. When my app starts it seeks the last item that was selected. This works, and the item is selected, but you have to scroll down in the list to see it if it is not in the first 25 visible items.

Is there a to make the list scroll to the item selected using LIST SEEK or @MATCH?

Cheers,

Nathan
Back to top
View user's profile Send private message
ShinobiSoft
Professional Member
Professional Member


Joined: 06 Nov 2002
Posts: 790
Location: Knoxville, Tn

PostPosted: Thu Jun 23, 2005 6:50 pm    Post subject: Reply with quote

According to the tabletst.dsc script the LIST SEEK command should work.
_________________
Bill Weckel
ShinobiSoft Software

"The way is known to all, but not all know it."
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
NathanH
Valued Newbie


Joined: 05 Sep 2001
Posts: 32

PostPosted: Thu Jun 23, 2005 7:31 pm    Post subject: Reply with quote

If you run the tabletst.dsc script and add 10 items, scroll to the bottom, then seek, it will highlight the first item in the list, but not scroll the list, if you try Match 'Yet another' it will find and highlight 'Yet another table item', but if it is "off screen" it will not scroll to it.

A LIST works as expected, it's just a TABLE that does not auto scroll to the item select

Any other ideas Question

Cheers

Nathan
Back to top
View user's profile Send private message
ShinobiSoft
Professional Member
Professional Member


Joined: 06 Nov 2002
Posts: 790
Location: Knoxville, Tn

PostPosted: Thu Jun 23, 2005 7:56 pm    Post subject: Reply with quote

This may or may not be the best way to handle this, but it works

Code:

rem Get the topindex
  %%LVM_GETTOPINDEX = 4135
  %%LVM_SCROLL = 4116
  REM This is an educated guess about the font height
  %%fontHeight = 15
  list seek,table1,20
  %%topIndex = @sendmsg(~table1,%%LVM_GETTOPINDEX,0,0)
  %%scrollAmt = @diff(@index(table1),%%topIndex)
  %z = @sendmsg(~table1,%%LVM_SCROLL,0,@prod(%%scrollAmt,%%fontHeight))
  dialog focus,table1


Hope this helps.

_________________
Bill Weckel
ShinobiSoft Software

"The way is known to all, but not all know it."
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
NathanH
Valued Newbie


Joined: 05 Sep 2001
Posts: 32

PostPosted: Thu Jun 23, 2005 9:17 pm    Post subject: Reply with quote

Thanks ShinobiSoft, I'll give it a try.

I found another work around that also does the job, basically I move the last selected item so it's at the top.

I'll try your code and see if that fits the bill better!

Cheers,

Nathan
Back to top
View user's profile Send private message
Aslan
Valued Contributor
Valued Contributor


Joined: 31 May 2001
Posts: 589
Location: Memphis, TN USA

PostPosted: Thu Jun 23, 2005 11:55 pm    Post subject: Reply with quote

This will take care of it for ya.

Code:
%%table = <TableName>
%X = @sendmsg(~%%table,$1013,@index(%%table),0)
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group