mIRC Home    About    Download    Register    News    Help

Print Thread
A
altazar
altazar
A
dialog colormod {

...
text "Select profile",990, 20 230 90 20
combo 991, 100 225 120 100, drop
button "Apply", 200, 40 265 50 30, ok default
button "Cancel", 201, 160 265 50 30, cancel
button "Save", 203, 100 265 50 30
}

on *:dialog:colormod:drop:991: {
echo -a It works!!!
set %colormod.m $readini(scripts\cm_db.ini,$did(colormod,991),m)
set %colormod.o $readini(scripts\cm_db.ini,$did(colormod,991),o)
set %colormod.v $readini(scripts\cm_db.ini,$did(colormod,991),v)
set %colormod.h $readini(scripts\cm_db.ini,$did(colormod,991),h)
...
}

i tried all events: menu, scroll, rclick, init etc. but nothing happen.. i don't know why

T
theRat
theRat
T
I'm pretty damn sure there isn't a "on DIALOG drop" event, so what are you trying to do?

Joined: Dec 2002
Posts: 698
N
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 698
The mouse events are not associated with specific controls, only with the dialog body, $did(0). :tongue:

A
altazar
altazar
A
i want to refresh some datas when i just select items in combo list without buttons

Joined: Dec 2002
Posts: 416
O
Fjord artisan
Offline
Fjord artisan
O
Joined: Dec 2002
Posts: 416
I do not believe DROP can be used as an event in a dialog like this

on *:dialog:colormod:drop:991: {

You would have to use Sclick

on *:dialog:colormod:sclick:991:


Here is an example of a combo box I use

Code:
  [color:red]Menu channel,menubar,query,status {
  Nick:dialog -mo dcn dcn
}
dialog dcn {
  title "Nick"
  size -1 -1 162 84
  option dbu
  combo 4, 4 7 35 70, drop
  button "On/Off", 25, 4 70 35 10
  button "Cancel", 26, 123 70 35 10, cancel
  button "Update", 27, 40 70 35 10, ok
}

on *:dialog:dcn:*:*:{
  if ($devent == init) {
    if ($did == 0) { 
      dcnon4
    }
  }
  if ($devent == sclick) {
    if ($did == 4) { if ($did(4).seltext) { set %on.clr $did(4).seltext | /dcnon4 } }
  }
}


alias -l dcnon4 {
  did -a dcn 4 01 White | set %dcnon 0
  did -a dcn 4 02 Black | set %dcnon 1
  did -a dcn 4 03 Dk.Blue | set %dcnon 2
  did -a dcn 4 04 Green | set %dcnon 3
  did -a dcn 4 05 05 Red | set %dcnon 4
  did -a dcn 4 06 Maroon | set %dcnon 5
  did -a dcn 4 07 Purple | set %dcnon 6
  did -a dcn 4 08 Orange | set %dcnon 7
  did -a dcn 4 09 Yellow | set %dcnon 8
  did -a dcn 4 10 Lt.Green | set %dcnon 9
  did -a dcn 4 11 Teal | set %dcnon 10
  did -a dcn 4 12 Cyan | set %dcnon 11
  did -a dcn 4 13 Blue | set %dcnon 12
  did -a dcn 4 14 Pink | set %dcnon 13
  did -a dcn 4 15 Dk.Grey | set %dcnon 14
  did -a dcn 4 16 Lt.Grey | set %dcnon 15
  did -c dcn 4 %on.clr 
}
  [/color]  

Joined: Jan 2003
Posts: 2,125
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,125
Use the sclick event for the combo. To get the item that was selected, use $did(<name>,<id>).seltext or $did(<name>,<id>,0)


Link Copied to Clipboard