mIRC Homepage

Dialog resizing bug.

Posted By: Tat

Dialog resizing bug. - 10/05/05 01:16 AM

Code:
  
on *:dialog:*:sclick:*:{  dialog -s $dname $dialog($dname).x $dialog($dname).y $dialog($dname).w $dialog($dname).h }
 


Put that in some place in a remotes, you'll notice all your dialogs going crazy any time you click. Even though it shouldn't really do anything. I wanted to resize something and figured that might work out, but apparently it went nutty. It either resizes wrong or returns the size wrong.
Posted By: Seifer

Re: Dialog resizing bug. - 10/05/05 04:33 AM

It looks to be doing exactly what it's supposed to do.
Code:
dialog test {
  size -1 -1 -1 -1
  button "", 1, 1 1 32 11
}

on *:DIALOG:test:sclick:1: {
  dialog -s $dname $dialog($dname).x $dialog($dname).y $dialog($dname).w $dialog($dname).h
}


Each time the button is pressed, the dialog will resize to $dialog($dname).w x $dialog($dname).h. Do remember that w & h are the width and height of the entire dialog, including borders and the titlebar, therefore the client area of the dialog will be changed to match the dialog's height and width.
Posted By: Hrung

Re: Dialog resizing bug. - 10/05/05 05:05 PM

So try $dialog($dname).cw and $dialog($dname).ch, though I have no idea what purpose that script could serve anyway.
© 2020 mIRC Discussion Forums