mIRC Home    About    Download    Register    News    Help

Topic Options
#2964 - 22/12/02 04:47 AM dialogs
_Marky_ Offline
Pikka bird

Registered: 20/12/02
Posts: 15
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

Top
#2965 - 22/12/02 05:24 AM Re: dialogs
Collective Offline
Planetary brain

Registered: 10/12/02
Posts: 3138
Loc: London, UK
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
  }
}

Top
#2966 - 22/12/02 05:40 AM Re: dialogs
_Marky_ Offline
Pikka bird

Registered: 20/12/02
Posts: 15
Perfect
thanks alot smile

Top
#2967 - 22/12/02 07:20 AM Re: dialogs
_Marky_ Offline
Pikka bird

Registered: 20/12/02
Posts: 15
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.

Top
#2968 - 22/12/02 07:25 AM Re: dialogs
_Marky_ Offline
Pikka bird

Registered: 20/12/02
Posts: 15
and then is there a way 2 keep the values stored so that next time i open the dialog they r still there?

Top
#2969 - 22/12/02 07:25 AM Re: dialogs
Collective Offline
Planetary brain

Registered: 10/12/02
Posts: 3138
Loc: London, UK
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
}

Top
#2970 - 22/12/02 08:08 AM Re: dialogs
_Marky_ Offline
Pikka bird

Registered: 20/12/02
Posts: 15
confused that second part only remembers the text in the edit box, not the list box

Top