| View previous topic :: View next topic |
| Author |
Message |
LiquidCode Moderator Team
Joined: 05 Dec 2000 Posts: 1752 Location: Space and Time
|
Posted: Fri Nov 14, 2003 2:12 pm Post subject: Right Click on BitList |
|
|
How can I detect a right click on a BitList. It has Click and DblClick but not RClick. I think I saw something for this before, but, I could not find it.
Thanks, _________________ Chris
Http://theblindhouse.com |
|
| Back to top |
|
 |
CodeScript Moderator Team

Joined: 08 Jun 2003 Posts: 1060 Location: India
|
Posted: Fri Nov 14, 2003 3:51 pm Post subject: |
|
|
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
Give your application a professional look with the VDSGUI Extension |
|
| Back to top |
|
 |
LiquidCode Moderator Team
Joined: 05 Dec 2000 Posts: 1752 Location: Space and Time
|
Posted: Fri Nov 14, 2003 4:51 pm Post subject: |
|
|
Well, that would be nice, but, @Click() only works for bitmaps. 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 |
|
 |
CodeScript Moderator Team

Joined: 08 Jun 2003 Posts: 1060 Location: India
|
Posted: Fri Nov 14, 2003 6:16 pm Post subject: |
|
|
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
Also U may wait and see if the VDS update will be released and it provides the solution. _________________ Regards
- CodeScript
Give your application a professional look with the VDSGUI Extension |
|
| Back to top |
|
 |
LiquidCode Moderator Team
Joined: 05 Dec 2000 Posts: 1752 Location: Space and Time
|
Posted: Fri Nov 14, 2003 6:37 pm Post subject: |
|
|
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!  _________________ Chris
Http://theblindhouse.com |
|
| Back to top |
|
 |
LiquidCode Moderator Team
Joined: 05 Dec 2000 Posts: 1752 Location: Space and Time
|
Posted: Fri Nov 14, 2003 6:56 pm Post subject: |
|
|
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 |
|
 |
Døc Newbie

Joined: 12 Sep 2003 Posts: 9 Location: Charleston, SC, USA
|
Posted: Tue Feb 03, 2004 4:17 am Post subject: |
|
|
| 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  |
|
| Back to top |
|
 |
|
|
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
|
|