mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Mar 2007
Posts: 3
I
Self-satisified door
OP Offline
Self-satisified door
I
Joined: Mar 2007
Posts: 3
Hi

I'm looking for a way to halt the default action when i single click on a listcb item (listbox with the check option enabled). So that I can single click on an item and the checked or unchecked state of the listcb item will not change. However, when I double click on the item, I wish it to change.

I've tried doing this with the "haltdef" and "halt" commands, however I didn't succeed when doing it that way. I also am aware that I could do it with similar code to the below, however, this will still change the state - even if it does reset it to the original state.
Code:
on *:dialog:DLG:sclick:1:{ 
  if ($did($dname,1).cstate) { did -s $dname 1 $did($dname,1).sel }
  if (!$did($dname,1).cstate) { did -l $dname 1 $did($dname,1).sel }
}


Or if someone has an alternative solution to how I can achieve the same result in a similar manner.

Any help on this would be really appreciated, am sorry if I should have searched better on the forum.

Regards.

Last edited by imsexxeh; 02/03/07 11:39 PM.
Joined: Feb 2007
Posts: 75
T
Babel fish
Offline
Babel fish
T
Joined: Feb 2007
Posts: 75
Why don't you just use dclick instead of sclick or am I misunderstanding something?

Btw can you please enclose the code in code brackets? It's the # button when you post :P


GigIRC Network Admin
irc.gigirc.com
Joined: Mar 2007
Posts: 3
I
Self-satisified door
OP Offline
Self-satisified door
I
Joined: Mar 2007
Posts: 3
Bsaically i have a list of channels, with a enable/disable check (for autojoin), but also a button for options. So when i single click, i want it to retain the state, so i can change an option (by clicking the options button), without changing the state of the channel. Get my idea or am I explaining it badly? smile

Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Unfortunately the method that you already have the code for is (to my knowledge) the only way of doing this. I was looking for something similar a long time ago, and ended up using a code like the one you've already supplied.

Joined: Mar 2007
Posts: 3
I
Self-satisified door
OP Offline
Self-satisified door
I
Joined: Mar 2007
Posts: 3
Thanks. I guessed as much to be honest. Perhaps an idea for the next mIRC release, however, it's not such a big thing. I'll just try using a different method.

Regards.

Joined: Jan 2007
Posts: 1,156
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2007
Posts: 1,156
JUst an idea, I havent clicked aroundon a list with checkboxes but ...

on *:dialog:name:sclick:1:/halt
on *:dialog:name:dclick:1:{
code
}

I had a list with two columns. COlumn on the left was the subjects, column on the right was the status. When you double clicked the subject it would turn on/off the switch and change the status in the column on the right.

Last edited by DJ_Sol; 04/03/07 09:15 PM.

Link Copied to Clipboard