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 on BitList

 
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: 1752
Location: Space and Time

PostPosted: Fri Nov 14, 2003 2:12 pm    Post subject: Right Click on BitList Reply with quote

How can I detect a right click on a BitList. It has Click and DblClick but not RClick. Sad I think I saw something for this before, but, I could not find it.

Thanks,

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


Joined: 08 Jun 2003
Posts: 1060
Location: India

PostPosted: Fri Nov 14, 2003 3:51 pm    Post subject: Reply with quote

How about using a List View (aka TABLE)
and setting Noheader and Fullrow select style (API)
Use @CLICK(B) to diferentiate click.

You can even add grid,checkboxes and many more things.
Table Control API :
http://www.vdsworld.com/index.php?page=download&fileid=341

The Only bug I remember is Riight click on a already selected
item is ignored.

Code:
#-----------------------------------------------------------------------------#
#                                                                             #
# Disclaimer - Use at your own risk                                           #
#                                                                             #
# Author:  CodeScript                                                         #
#                                                                             #
# Copyright: © 2003 CodeScript Software                                       #
#                                                                             #
#-----------------------------------------------------------------------------#
  DIALOG CREATE,Table Demo,-1,0,245,160
  DIALOG ADD,TABLE,TABLE1,7,19,209,144,Column 1[205],,,CLICK
  %H = @STRDEL(@WINEXISTS(~Table1),1,1)
  LOADLIB USER32
  REM No Header Style
  %A = @LIB(USER32,GetWindowLongA,int:,int:%H,int:-16)
  %B = @LIB(USER32,SetWindowLongA,int:,int:%H,int:-16,@SUM(%A,$4000))
  REM FULL ROW SELECT
  %X = @SENDMSG(@WINEXISTS(~TABLE1),@SUM($1000,54),0,$20)
  REM Add Grid
  %X = @SENDMSG(@WINEXISTS(~TABLE1),@SUM($1000,54),0,$21)
  FREELIB USER32
  DIALOG SHOW

  LIST ADD,TABLE1,HEY
  LIST ADD,TABLE1,HAI
  LIST ADD,TABLE1,HELLO

:TABLE1CLICK
  IF @EQUAL(@CLICK(B),RIGHT)
  INFO RIGHT CLICK
  END
:EVLOOP
WAIT EVENT
GOTO @EVENT()

:CLOSE
EXIT

_________________
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
LiquidCode
Moderator Team


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

PostPosted: Fri Nov 14, 2003 4:51 pm    Post subject: Reply with quote

Well, that would be nice, but, @Click() only works for bitmaps. Sad At least I have never got it to work with anything else. I tried your code and it didn't work.
_________________
Chris
Http://theblindhouse.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
CodeScript
Moderator Team


Joined: 08 Jun 2003
Posts: 1060
Location: India

PostPosted: Fri Nov 14, 2003 6:16 pm    Post subject: Reply with quote

If it doesn't work then U can use Call GetAsyncKeyState API to retrieve the state of Rt mouse button in conjunction with a timer. I seem to have written some code like that but cannot find it now Confused
Also U may wait and see if the VDS update will be released and it provides the solution.

_________________
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
LiquidCode
Moderator Team


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

PostPosted: Fri Nov 14, 2003 6:37 pm    Post subject: Reply with quote

Yeah, I'll give the API a try. I hope that the @mousedown() and @click() are updated if/when the updated is released.

Thanks for the help! Smile

_________________
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: 1752
Location: Space and Time

PostPosted: Fri Nov 14, 2003 6:56 pm    Post subject: Reply with quote

Ok, I found a work around.

Code:

 IF @EQUAL(@WINATPOINT(@MOUSEPOS(x),@MOUSEPOS(y)),@win(~Bitlist))
   loadlib USER32
   %%rbutton = @lib(user32,GetKeyState,int:,$02)
   freelib USER32
    if @not(@greater(%%rbutton,-1))
       %%rbutton =
       dialog popup,Exit
    end
 END

_________________
Chris
Http://theblindhouse.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Døc
Newbie


Joined: 12 Sep 2003
Posts: 9
Location: Charleston, SC, USA

PostPosted: Tue Feb 03, 2004 4:17 am    Post subject: Reply with quote

CodeScript wrote:
The Only bug I remember is Riight click on a already selected item is ignored.


Too bad this problem wasn't fixed in the 5.01 update Sad
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