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 


Scroll table item into view

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
LiquidCode
Moderator Team


Joined: 05 Dec 2000
Posts: 1753
Location: Space and Time

PostPosted: Sun May 01, 2011 1:06 am    Post subject: Scroll table item into view Reply with quote

Is there a way that I can select and item in a table and if it is not showing in the view have the table scroll the item into view? I know that I can use API on a list box to do that, but is there one for a table?

Thanks

_________________
Chris
Http://theblindhouse.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
LiquidCode
Moderator Team


Joined: 05 Dec 2000
Posts: 1753
Location: Space and Time

PostPosted: Mon May 02, 2011 10:47 pm    Post subject: Reply with quote

No one knows a way to do this?
_________________
Chris
Http://theblindhouse.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
cnodnarb
Professional Member
Professional Member


Joined: 11 Sep 2002
Posts: 766
Location: Eastman, GA

PostPosted: Tue May 03, 2011 1:35 am    Post subject: Reply with quote

Actually, I've never used the table element Embarassed

I'll have a look this evening before starting to build a scroll panel dsu Cool
Back to top
View user's profile Send private message AIM Address
cnodnarb
Professional Member
Professional Member


Joined: 11 Sep 2002
Posts: 766
Location: Eastman, GA

PostPosted: Tue May 03, 2011 2:31 am    Post subject: Reply with quote

Code:
REM NOPE
%%match = @match(table1,nodnarb50)
%%index = @index(table1)
list seek,table1,%%index


Code:
REM NOPE - almost. Scrollbar check not recursed in control code.
%%match = @match(table1,nodnarb50)
%%index = @index(table1)
list seek,table1,%%index
%%table1 = @strdel(@winexists(~table1),1,1)
LOADLIB user32.dll
  %%SetScrollPos = @lib(user32.dll,SetScrollPos,INT:,%%table1,1,%%index,1)
FREELIB user32.dll

Code:
REM NOPE
%%match = @match(table1,nodnarb50)
%%index = @index(table1)
list seek,table1,%%index
%%LB_SETTOPINDEX = @sendmsg(@winexists(~table1),$0197,%%index,1)


Code:
REM YES
option skdelay,0
%%match = @match(table1,nodnarb50)
%%index = @index(table1)
list seek,table1,%%index
%%WM_SETREDRAW = @sendmsg(@winexists(~table1),$B,0,0)
list seek,table1,0
%%count = -1
dialog focus,table1
repeat
%%count = @succ(%%count)
window send,@winexists(~table1),@key(down)
until @equal(%%count,%%index)
%%WM_SETREDRAW = @sendmsg(@winexists(~table1),$B,1,0)
Back to top
View user's profile Send private message AIM Address
LiquidCode
Moderator Team


Joined: 05 Dec 2000
Posts: 1753
Location: Space and Time

PostPosted: Tue May 03, 2011 2:52 am    Post subject: Reply with quote

Sweet! Never thought of send the Down key to it. Thanks a lot! I'll be using this in Save-It!
_________________
Chris
Http://theblindhouse.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Aslan
Valued Contributor
Valued Contributor


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

PostPosted: Tue May 03, 2011 4:19 am    Post subject: Reply with quote

The Table element is a listview control in report mode where it is in list mode for the List element. Same API as for a List element.

just use @match or list seek then use the LVS_ENSUREVISABLE API macro

%x = @sendmsg(~table1,$1013,@index(table1),0)
Back to top
View user's profile Send private message Send e-mail
LiquidCode
Moderator Team


Joined: 05 Dec 2000
Posts: 1753
Location: Space and Time

PostPosted: Tue May 03, 2011 11:41 am    Post subject: Reply with quote

I tried that already and it didn't work. I'll try it again. Maybe I did it wrong the first time.

Well, it does work on a regular table, but I think since I added group view, it doesn't work after that. Confused

Edit: Yes it does work with groups. I didn't test it right.. Rolling Eyes

Thanks!

_________________
Chris
Http://theblindhouse.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
cnodnarb
Professional Member
Professional Member


Joined: 11 Sep 2002
Posts: 766
Location: Eastman, GA

PostPosted: Tue May 03, 2011 12:41 pm    Post subject: Reply with quote

I like Aslans way better too ;p Can't beat experience Wink
Back to top
View user's profile Send private message AIM Address
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