mIRC Home    About    Download    Register    News    Help

Print Thread
dialogs #2964
22/12/02 04:47 AM
22/12/02 04:47 AM
Joined: Dec 2002
Posts: 15
_
_Marky_ Offline OP
Pikka bird
_Marky_  Offline OP
Pikka bird
_

Joined: Dec 2002
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

Re: dialogs #2965
22/12/02 05:24 AM
22/12/02 05:24 AM
Joined: Dec 2002
Posts: 3,138
London, UK
C
Collective Offline
Hoopy frood
Collective  Offline
Hoopy frood
C

Joined: Dec 2002
Posts: 3,138
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
  }
}

Re: dialogs #2966
22/12/02 05:40 AM
22/12/02 05:40 AM
Joined: Dec 2002
Posts: 15
_
_Marky_ Offline OP
Pikka bird
_Marky_  Offline OP
Pikka bird
_

Joined: Dec 2002
Posts: 15
Perfect
thanks alot smile

Re: dialogs #2967
22/12/02 07:20 AM
22/12/02 07:20 AM
Joined: Dec 2002
Posts: 15
_
_Marky_ Offline OP
Pikka bird
_Marky_  Offline OP
Pikka bird
_

Joined: Dec 2002
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.

Re: dialogs #2968
22/12/02 07:25 AM
22/12/02 07:25 AM
Joined: Dec 2002
Posts: 15
_
_Marky_ Offline OP
Pikka bird
_Marky_  Offline OP
Pikka bird
_

Joined: Dec 2002
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?

Re: dialogs #2969
22/12/02 07:25 AM
22/12/02 07:25 AM
Joined: Dec 2002
Posts: 3,138
London, UK
C
Collective Offline
Hoopy frood
Collective  Offline
Hoopy frood
C

Joined: Dec 2002
Posts: 3,138
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
}

Re: dialogs #2970
22/12/02 08:08 AM
22/12/02 08:08 AM
Joined: Dec 2002
Posts: 15
_
_Marky_ Offline OP
Pikka bird
_Marky_  Offline OP
Pikka bird
_

Joined: Dec 2002
Posts: 15
confused that second part only remembers the text in the edit box, not the list box