LiquidCode Moderator Team
Joined: 05 Dec 2000 Posts: 1753 Location: Space and Time
|
Posted: Wed May 01, 2002 6:45 pm Post subject: Right CLICK a list |
|
|
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 |
|