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 


Right CLICK a list

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Visual DialogScript 4 Source Code
View previous topic :: View next topic  
Author Message
LiquidCode
Moderator Team


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

PostPosted: Wed May 01, 2002 6:45 pm    Post subject: Right CLICK a list Reply with quote

You can use the DESIGN style on the dialog to
simulate the RIGHT CLICK. NO EXTERNAL DLL NEEDED!
I'll post this code in the VDS4 code section as well.

BUT you do now need to know that *ALMOST* EVERY element will
generate a click event.

I also created code to use VDSKey.dll if the DESIGN style will not
work for your program.

Code:

rem Code without dll
   dialog CREATE,Right click List,-1,0,197,191,CLASS RCL,DESIGN
   rem *** Modified by Dialog Designer on 5/1/02 - 14:12 ***
   dialog ADD,LIST,LIST1,4,8,180,144,,,
   dialog ADD,TEXT,TEXT1,158,12,,,Right click on an item
   dialog SHOW

   list loadtext,list1
"item0
"item1
"item2
"item3
"item4

:evloop
   wait event
   %e = @event()
   goto %e

:LIST1CLICK
if @equal(@click(B),RIGHT)
   window click,#RCL,@diff(@mousepos(X),@dlgpos(,L)),@diff(@mousepos(Y),@dlgpos(,T))
   info @dlgtext(list1)
end
goto evloop

:close
   stop



Code:

            rem code WITH dll
   external VDSKey.dll
   dialog CREATE,Right click List,-1,0,197,191,CLASS RCL
   rem *** Modified by Dialog Designer on 5/1/02 - 14:12 ***
   dialog ADD,LIST,LIST1,4,8,180,144,,,
   dialog ADD,TEXT,TEXT1,158,12,,,Right click on an item
   dialog SHOW

   list loadtext,list1
"item0
"item1
"item2
"item3
"item4

:evloop
   wait event,0
   %e = @event()
   goto %e

:timer
   if @equal(@winactive(C),RCL)
      if @keyboard(rbutton)
         window click,#RCL,@diff(@mousepos(X),@dlgpos(,L)),@diff(@mousepos(Y),@dlgpos(,T))
         info @dlgtext(list1)
      end
   end
   goto evloop

:close
   stop


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


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Wed May 01, 2002 8:27 pm    Post subject: Reply with quote

That's cool Chris, Wink

It also works in VDS 3...

Cheers, Mac Smile

_________________
VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
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: Thu May 02, 2002 12:26 am    Post subject: Reply with quote

Yeah, I know... Wink Laughing
_________________
Chris
Http://theblindhouse.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Visual DialogScript 4 Source Code 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