mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Nov 2005
Posts: 42
A
Aenei Offline OP
Ameglian cow
OP Offline
Ameglian cow
A
Joined: Nov 2005
Posts: 42
I have 2 combo boxes, and on init of the dialog the first has the active server connections loaded into it. The second should then load the channel and message windows open on that server into it; and on selection of a different network reloads the window list.

Only problem is it is not resizing the drop of the dropdown. So either I have values cut off the bottom or else I have a large empty space. Any suggestions anyone? The code which is loading the window list is:
Code:
    var %i = 1 | var %i.max = $calc($chan(0) + $query(0))
    scid $did($dname,116).sel
    did -r $dname 117
    while ( %i <= %i.max ) {
      did -i $dname 117 %i $iif($chan(%i),$chan(%i),$query($calc( %i - $chan(0) )))
      inc %i
    }

Joined: Dec 2002
Posts: 1,245
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
try this
Code:
alias combotest dialog -m combotest combotest
dialog ComboTest {
  title "Combo Box Test"
  size -1 -1 100 60
  option dbu
  combo 100, 5 5 90 50, drop sort
  combo 200, 5 20 90 50, drop sort
  button "Update", 900, 25 40 50 10
} 
on *:dialog:combotest:init:0:{
  var %i = 1
  var %tokens = *.mrc *.ini *.txt
  while (%i <= 3) {
    did -a combotest 100 $gettok(%tokens,%i,32)
    inc %i
  }
  did -c combotest 100 1
  var %item = $did(combotest,100,0).text
  var %null = $findfile($mircdir,%item,0,did -a combotest 200 $nopath($1-))
  did -c combotest 200 1
}
on *:dialog:combotest:sclick:900:{
  did -r combotest 200
  var %item = $did(combotest,100,0).text
  var %null = $findfile($mircdir,%item,0,did -a combotest 200 $nopath($1-))
  did -c combotest 200 1
}


this just shows combo boxes, and I think you used -i "insert" rather than -a "add"
I don't know if thats causing your size issue but try the -a and see

Joined: Nov 2005
Posts: 42
A
Aenei Offline OP
Ameglian cow
OP Offline
Ameglian cow
A
Joined: Nov 2005
Posts: 42
Outstanding, -a does what I want it to. Thanks a lot.


Link Copied to Clipboard