Resisable Dialog - 23/04/06 05:22 PM
Hi all, Myself and Sladekraven have made a dialog which is treeview and shows various information, we use hoSdock.dll to dock it, this works fine, where the problem lies is when the dialog is docked, it is a static size, therefore cant be resized on the fly, now for myself, I am using a rather large screen resolution, (2048 by 1536) and my other machine is using a much smaller one (1024 by 768), the width of the dialog is perfect and there is ampel room to show all the expanded treeview items. How would I go about changing the dialog so when I resize the actual mIRC client the docked dialog changes it hight with it at the same time?
here is the code:
Any help would be great!
here is the code:
Code:
dialog spanel { size -1 -1 216 500 title "Script Panel" option pixel } On *:DIALOG:spanel:*:*: { if ( $devent == init ) { dcx Mark $dname spanel xdialog -b spanel +tysmn xdialog -c spanel 3 treeview -2 0 220 664 haslines linesatroot hasbuttons showsel fullrow xdid -i spanel 3 +b $rgb(0,0,0) xdid -w spanel 3 +n 1 $shell xdid -w spanel 3 +n 9 $shell xdid -w spanel 3 +n 16 $shell xdid -w spanel 3 +n 3 $shell xdid -w spanel 3 +n 26 $shell xdid -w spanel 3 +n 60 $shell xdid -w spanel 3 +n 71 $shell xdid -w spanel 3 +n 72 $shell xdid -w spanel 3 +n 96 $shell xdid -w spanel 3 +n 97 $shell xdid -a spanel 3 $tab(-1,+bcu 4 4 1 1 0 $color(9) Script Panel) xdid -a spanel 3 $tab(-1,+bcu 4 4 1 1 0 $color(9) Panel Options) ;Mp3 Player Panel xdid -a spanel 3 $+(1 0 1,$chr(9),+bc 5 5 0 0 0 $color(9) Mp3 Player) xdid -a spanel 3 $+(1 1 1,$chr(9),+bc 7 7 0 0 0 $color(9) WMA) xdid -a spanel 3 $+(1 1 1,$chr(9),+bc 7 7 0 0 0 $color(9) Mp3's) ;IRCop Panel xdid -a spanel 3 $+(1 0 1,$chr(9),+bc 8 8 0 0 0 $color(9) Clone Scanner) ;IRCop Panel xdid -a spanel 3 $+(1 0 1,$chr(9),+bc 8 8 0 0 0 $color(9) IRCop Scanner) xdid -a spanel 3 $+(1 1 1,$chr(9),+bc 2 2 0 0 0 $color(9) Operators) ;Notify List Panel xdid -a spanel 3 $+(1 0 1,$chr(9),+bc 3 3 0 0 0 $color(9) Notify List) xdid -a spanel 3 $+(1 1 1,$chr(9),+bc 10 10 0 0 0 $color(9) Offline) xdid -a spanel 3 $+(1 1 1,$chr(9),+bc 9 9 0 0 0 $color(9) Online) var %x = 1 while (%x <= $notify(0)) { if ($dialog(spanel)) { if ($notify(%x).ison) { xdid -a spanel 3 $+(1 1 1 1,$chr(9),+bc 9 9 0 0 0 $rgb(255,255,255) $notify(%x),$chr(9),Right click to remove $notify(%x) from notify list.) } if (!$notify(%x).ison) { xdid -a spanel 3 $+(1 1 2 1,$chr(9),+bc 10 10 0 0 0 $rgb(255,255,255) $notify(%x),$chr(9),Right click to remove $notify(%x) from notify list.) } } inc %x } xdid -t spanel 3 +a root xdid -t spanel 3 +c 1 4 1 xdid -t spanel 3 +c 1 4 2 if ($isfile($+(",$mircdirdcx\sladescript_npanel_mp3s.txt,"))) .play -s $+(",$mircdirdcx\sladescript_npanel_mp3s.txt,") 10 if ($isfile($+(",$mircdirdcx\sladescript_npanel_wmas.txt,"))) .play -s $+(",$mircdirdcx\sladescript_npanel_wmas.txt,") 10 } if ($devent == close) { splay stop } }
Any help would be great!