mIRC Homepage
Posted By: _Marky_ dialogs - 22/12/02 04:47 AM
this is a part of my dialog :

check "Auto Away After:", 10, 8 40 53 10
edit "", 11, 61 41 19 10, disable

how can i make it so that when i check the box it enables the edit box, and when i uncheck it disables the edit box?

thanks if u can help
Posted By: Collective Re: dialogs - 22/12/02 05:24 AM
Code:
on *:DIALOG:dialogname:sclick:10:{
  if ( $did(dialogname,10).state == 1 ) {
    did -e dialogname 11
  }
  if ( $did(dialogname,10).state == 0 ) {
    did -b dialogname 11
  }
}
Posted By: _Marky_ Re: dialogs - 22/12/02 05:40 AM
Perfect
thanks alot smile
Posted By: _Marky_ Re: dialogs - 22/12/02 07:20 AM
one more thing..
i quickly made this dialog 2 test something:
Code:
  dialog listbox {
  title "listbox"
  size -1 -1 251 91
  option dbu
  list 1, 36 23 50 50, sort size vsbar
  button "add", 2, 89 21 37 12
  button "remove", 3, 90 43 37 12
  button "ok", 4, 164 70 37 12, ok cancel
  edit "", 5, 36 9 50 10
}


and then
on *:dialog:listbox:sclick:2: did -a $dname 1 $did(5)

i was wondering what the command is to remove the selected text in the listbox.
i dont wanna remove all the text from the list...only the selected line.
Posted By: _Marky_ Re: dialogs - 22/12/02 07:25 AM
and then is there a way 2 keep the values stored so that next time i open the dialog they r still there?
Posted By: Collective Re: dialogs - 22/12/02 07:25 AM
The command would be:

did -d $dname 1 $did($dname,1).sel

As for keeping the values stored that can be done like this:

Code:
on *:DIALOG:listbox:init:0:{
  did -a $dname 5 %listbox5
}
on *:DIALOG:listbox:close:0:{
  set %listbox5 $did($dname,5).text
}
Posted By: _Marky_ Re: dialogs - 22/12/02 08:08 AM
confused that second part only remembers the text in the edit box, not the list box
© mIRC Discussion Forums