The Gate Keeper got me interrested in making a resizable nicklist. I did a little studying in the mdx help file as well as nicklist.dll help file, and came up with this code...
dialog nick {
title ""
size 0 0 402 372
option dbu
list 1, 0 18 79 279, sort size extsel
list 3, 0 8 79 11, size
text "", 13, -1 0 95 9, center
list 2, 0 297 79 11, size
}
on 1:dialog:nick*:init:*: {
dll $mdxdll SetMircVersion $version
dll $mdxdll MarkDialog $dname
dll $mdxdll SetDialog $dname style
dll $mdxdll SetControlMDX $dname 1 listview rowselect smallicon report showsel > $viewsmdx
dll $mdxdll SetMDXStyle $dname 1 list showsel > $viewsmdx
dll $mdxdll SetControlMDX $dname 3 listview rowselect smallicon report showsel > $viewsmdx
dll $mdxdll SetMDXStyle $dname 3 list showsel > $viewsmdx
dll $mdxdll SetControlMDX $dname 3 smallicon > $viewsmdx
dll $mdxdll SetControlMDX $dname 2 listview rowselect smallicon report showsel > $viewsmdx
dll $mdxdll SetMDXStyle $dname 2 list showsel > $viewsmdx
dll $mdxdll SetControlMDX $dname 2 smallicon > $viewsmdx
dll $mdxdll SetColor $dname 2 text $rgb(0,0,252)
dll $mdxdll SetColor $dname 2 background $rgb(255,255,255)
did -i $dname 1 1 headerdims $calc($gettok(%nicksize,1,32) - 6) $+ :1 0:2
did -i $dname 3 1 headerdims $calc($gettok(%nicksize,1,32) - 6) $+ :1 0:2
dll $mdxdll SetColor $dname 1 text $rgb(0,0,252)
dll $mdxdll SetColor $dname 3 text $rgb(0,0,252)
dll $mdxdll SetColor $dname 3 background $rgb(255,255,255)
dll $mdxdll SetDialog $dname bgcolor $rgb(255,255,255)
dll $mdxdll SetColor $dname 3 textbg $rgb(255,255,255)
dll $nickdll Nicklist $dname $right($dname,-4)
did -a $dname 3 $me $statslist($me($1,%x),$active)
did -i $dname 1 1 iconsize normal small
did -i $dname 1 1 seticon normal $nickpic(owner)
did -i $dname 1 1 seticon normal $nickpic(host)
did -i $dname 1 1 seticon normal $nickpic(specs)
did -i $dname 1 1 seticon normal $nickpic(nopic)
did -i $dname 1 1 seticon normal $nickpic(msn)
did -i $dname 1 1 seticon normal $nickpic(participant)
did -i $dname 1 1 seticon normal $nickpic(girlpic)
did -i $dname 1 1 seticon normal $nickpic(boywithpic)
did -i $dname 1 1 seticon normal $nickpic(girlwithpic)
did -i $dname 1 1 seticon normal $nickpic(cup)
did -i $dname 1 1 seticon normal $nickpic(normal)
did -i $dname 1 1 seticon normal $nickpic(star)
did -i $dname 1 1 seticon normal $nickpic(msger)
did -i $dname 1 1 seticon normal $nickpic(ignore)
did -i $dname 1 1 seticon normal $shortfn($scriptdirimages\kick.bmp)
did -i $dname 1 1 seticon normal $shortfn($scriptdirimages\checkmark.bmp)
did -i $dname 1 1 settxt color $rgb(255,255,255)
did -i $dname 1 1 settxt color $rgb(0,0,0)
did -i $dname 1 1 settxt color $rgb(0,0,85)
did -i $dname 1 1 settxt color $rgb(85,170,0)
did -i $dname 1 1 settxt color $rgb(215,0,5)
did -i $dname 1 1 settxt color $rgb(128,0,0)
did -i $dname 1 1 settxt color $rgb(128,0,128)
did -i $dname 1 1 settxt color $rgb(255,128,0)
did -i $dname 1 1 settxt color $rgb(255,255,0)
did -i $dname 1 1 settxt color $rgb(128,255,128)
did -i $dname 1 1 settxt color $rgb(128,128,64)
did -i $dname 1 1 settxt color $rgb(0,255,255)
did -i $dname 1 1 settxt color $rgb(0,0,255)
did -i $dname 1 1 settxt color $rgb(255,0,128)
did -i $dname 1 1 settxt color $rgb(128,128,128)
did -i $dname 1 1 settxt color $rgb(192,192,192)
did -i $dname 1 1 settxt color $rgb(0,0,255)
did -i $dname 3 1 iconsize normal small
did -i $dname 3 1 seticon normal $nickpic(owner)
did -i $dname 3 1 seticon normal $nickpic(host)
did -i $dname 3 1 seticon normal $nickpic(spec)
did -i $dname 3 1 seticon normal $nickpic(nopic)
did -i $dname 3 1 seticon normal $nickpic(msn)
did -i $dname 3 1 seticon normal $nickpic(boypic)
did -i $dname 3 1 seticon normal $nickpic(girlpic)
did -i $dname 3 1 seticon normal $nickpic(boywithpic)
did -i $dname 3 1 seticon normal $nickpic(girlwithpic)
did -i $dname 3 1 seticon normal $nickpic(cup)
did -i $dname 3 1 seticon normal $nickpic(normal)
did -i $dname 3 1 seticon normal $nickpic(star)
did -i $dname 3 1 seticon normal $nickpic(msger)
did -i $dname 3 1 seticon normal $nickpic(ignore)
did -i $dname 3 1 seticon normal $shortfn($findfile($mircdir,kick.bmp,1))
did -i $dname 3 1 seticon normal $shortfn($findfile($mircdir,checkmark.bmp,1))
did -i $dname 3 1 settxt color $rgb(128,0,128)
did -ra $dname 2 $active
did -i $dname 2 1 settxt color $rgb(128,0,128)
.timergetnicks 1 0 getnicks $msn.get($cid,fullroom)
}
on *:SIGNAL:*: {
if ($4 == 1) {
dll $mdxdll MoveControl $1 1 * * $calc($2 - 20) $calc($3 - 55)
dll $mdxdll MoveControl $1 2 * $calc($3 - 20) $calc($2 - 20) *
dll $mdxdll MoveControl $1 3 * * $calc($2 - 20) *
dll $mdxdll MoveControl $1 13 * * $2 *
}
}
This code works when you move the nicklist. However, I also want it to automatically resize when the nicklist initializes. Is there a way to be able to do this?