mIRC Home    About    Download    Register    News    Help

Print Thread
Resisable Dialog #147756 23/04/06 05:22 PM
Joined: Feb 2005
Posts: 185
S
Skeletor Offline OP
Vogon poet
OP Offline
Vogon poet
S
Joined: Feb 2005
Posts: 185
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:

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!


sub-zero.homeip.net:6667

Re: Resisable Dialog #147757 23/04/06 06:10 PM
Joined: Oct 2005
Posts: 1,741
G
genius_at_work Offline
Hoopy frood
Offline
Hoopy frood
G
Joined: Oct 2005
Posts: 1,741
You can resize a dialog by using the /dialog -s <dname> x y w h command. As for detecting when the size of the main mIRC window has changed and the size to which it was changed, I'm not sure how that can be done. Maybe a repeating timer or a DLL could be used.

-genius_at_work

Re: Resisable Dialog #147758 25/04/06 02:22 PM
Joined: Apr 2004
Posts: 759
M
Mpdreamz Offline
Hoopy frood
Offline
Hoopy frood
M
Joined: Apr 2004
Posts: 759
If all is well then the docked dialog should resize when mIRC resizes as well. If you add CLA rules to your dialog it will resize without timer's $calc's and manual positioning of controls.


$maybe