| View previous topic :: View next topic |
| Author |
Message |
tim6389 Professional Member


Joined: 01 Aug 2002 Posts: 790
|
Posted: Sun Feb 01, 2004 7:29 pm Post subject: question about click event |
|
|
hello all
I can make vds have 2 click function meaing
| Code: |
DIALOG ADD,LIST,LIST1,125,7,288,226,,CLICK
|
can i make this so if a user right click it goes to other part in the code and if the users left clicks that also goes to a diffenert part of the code meaning
| Code: |
:rightclick
info do something
|
| Code: |
:leftclick
info do something else
|
can this be done? if so how i have tried a few ways but no go
thanks _________________ Have a nice day  |
|
| Back to top |
|
 |
Skit3000 Admin Team

Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
Posted: Sun Feb 01, 2004 7:36 pm Post subject: |
|
|
You can use the code below to do such a thing:
| Code: | DIALOG CREATE,Test Dialog,10,10,300,300
DIALOG ADD,LIST,LIST1,125,7,288,226,,CLICK
DIALOG SHOW
:Evloop
wait event
goto @event()
:List1CLICK
if @equal(@click(B),RIGHT)
rem If right clicked, jump to the : List1RCLICK label...
goto List1RCLICK
end
info Left clicked!
goto Evloop
:List1RCLICK
info Right clicked!
goto Evloop |
_________________ [ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial! |
|
| Back to top |
|
 |
tim6389 Professional Member


Joined: 01 Aug 2002 Posts: 790
|
Posted: Sun Feb 01, 2004 7:51 pm Post subject: hummm |
|
|
well
i tried that code and it don't seem to work  _________________ Have a nice day  |
|
| Back to top |
|
 |
Skit3000 Admin Team

Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
|
| Back to top |
|
 |
tim6389 Professional Member


Joined: 01 Aug 2002 Posts: 790
|
Posted: Sun Feb 01, 2004 8:00 pm Post subject: hummmm |
|
|
something else must be worng i get no msg no mater what button i click _________________ Have a nice day  |
|
| Back to top |
|
 |
tim6389 Professional Member


Joined: 01 Aug 2002 Posts: 790
|
Posted: Sun Feb 01, 2004 8:42 pm Post subject: :) |
|
|
any other ideas  _________________ Have a nice day  |
|
| Back to top |
|
 |
tim6389 Professional Member


Joined: 01 Aug 2002 Posts: 790
|
Posted: Sun Feb 01, 2004 11:02 pm Post subject: i see |
|
|
i see what is worng the click event only goes to the :click lable when you left click.... when you right click that won't got to the :click lable thus it can't see what button was clicked
i hope i make sences _________________ Have a nice day  |
|
| Back to top |
|
 |
CodeScript Moderator Team

Joined: 08 Jun 2003 Posts: 1060 Location: India
|
Posted: Mon Feb 02, 2004 2:11 am Post subject: |
|
|
you can use VDS Table element (if in vds 5 and use API to avoid display of headers
It's simple - use @CLICK(B) under the click label.
you need vds 5 for it.
You can take a look at my post in this topic
http://forum.vdsworld.com/viewtopic.php?t=2159
if not on vds 5 you can use vdslists dll _________________ Regards
- CodeScript
Give your application a professional look with the VDSGUI Extension |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Mon Feb 02, 2004 8:53 am Post subject: |
|
|
Couple of alternatives that might work for ya...
1. Use a popup menu at the list click label, and let the
user choose options from the menu.
2. Use both CLICK and DBLCLICK styles on the list.
You can then use 2 labels for the same list:
:List1CLICK
:List1DBLCLICK
Cheers, Mac  _________________ 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 |
|
 |
tim6389 Professional Member


Joined: 01 Aug 2002 Posts: 790
|
Posted: Mon Feb 02, 2004 5:18 pm Post subject: hummmm |
|
|
that popup menu is a really good idea mac.....would ya have any examples handy for this?
thanks _________________ Have a nice day  |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Mon Feb 02, 2004 9:13 pm Post subject: |
|
|
Here ya go...
| Code: |
OPTION SCALE, 96
OPTION DECIMALSEP, "."
TITLE By Mac
DIALOG CREATE,"Test Program",-1,0,300,200
DIALOG ADD,LIST,L1,4,4,292,192,,CLICK
DIALOG SHOW
LIST ADD, L1, Test 1
LIST ADD, L1, Test 2
LIST ADD, L1, Test 3
:CancelMENU
:EVLOOP
WAIT EVENT
goto @event()
:L1CLICK
DIALOG POPUP,Option 1|Option 2|Cancel|-|Exit
%e = @event()
if %e
goto %e
end
goto EVLOOP
:Option 1MENU
INFO Option 1
goto EVLOOP
:Option 2MENU
INFO Option 2
goto EVLOOP
:ExitMENU
:CLOSE
EXIT
|
Cheers, Mac  _________________ 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 |
|
 |
tim6389 Professional Member


Joined: 01 Aug 2002 Posts: 790
|
Posted: Mon Feb 02, 2004 9:51 pm Post subject: |
|
|
coool thanks all for the help
thank you very much _________________ Have a nice day  |
|
| Back to top |
|
 |
|