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 


question about click event

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Sun Feb 01, 2004 7:29 pm    Post subject: question about click event Reply with quote

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 Sad

thanks

_________________
Have a nice day Smile
Back to top
View user's profile Send private message
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Sun Feb 01, 2004 7:36 pm    Post subject: Reply with quote

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
View user's profile Send private message
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Sun Feb 01, 2004 7:51 pm    Post subject: hummm Reply with quote

well

i tried that code and it don't seem to work Sad

_________________
Have a nice day Smile
Back to top
View user's profile Send private message
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Sun Feb 01, 2004 7:55 pm    Post subject: Reply with quote

Does it always give you the "Left clicked!" message? Or is something else wrong?
_________________
[ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial!
Back to top
View user's profile Send private message
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Sun Feb 01, 2004 8:00 pm    Post subject: hummmm Reply with quote

something else must be worng i get no msg no mater what button i click
_________________
Have a nice day Smile
Back to top
View user's profile Send private message
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Sun Feb 01, 2004 8:42 pm    Post subject: :) Reply with quote

any other ideas Smile
_________________
Have a nice day Smile
Back to top
View user's profile Send private message
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Sun Feb 01, 2004 11:02 pm    Post subject: i see Reply with quote

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 Smile
Back to top
View user's profile Send private message
CodeScript
Moderator Team


Joined: 08 Jun 2003
Posts: 1060
Location: India

PostPosted: Mon Feb 02, 2004 2:11 am    Post subject: Reply with quote

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
Arrow Give your application a professional look with the VDSGUI Extension
Back to top
View user's profile Send private message Visit poster's website
Mac
Professional Member
Professional Member


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

PostPosted: Mon Feb 02, 2004 8:53 am    Post subject: Reply with quote

Couple of alternatives that might work for ya... Wink

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 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
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Mon Feb 02, 2004 5:18 pm    Post subject: hummmm Reply with quote

that popup menu is a really good idea mac.....would ya have any examples handy for this?


thanks

_________________
Have a nice day Smile
Back to top
View user's profile Send private message
Mac
Professional Member
Professional Member


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

PostPosted: Mon Feb 02, 2004 9:13 pm    Post subject: Reply with quote

Here ya go... Wink
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 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
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Mon Feb 02, 2004 9:51 pm    Post subject: Reply with quote

coool thanks all for the help


thank you very much

_________________
Have a nice day Smile
Back to top
View user's profile Send private message
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