mIRC Home    About    Download    Register    News    Help

Print Thread
I
imsexxeh
imsexxeh
I
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.
T
Trixar_za
Trixar_za
T
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

I
imsexxeh
imsexxeh
I
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

R
RusselB
RusselB
R
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.

I
imsexxeh
imsexxeh
I
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.

D
DJ_Sol
DJ_Sol
D
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