mIRC Home    About    Download    Register    News    Help

Print Thread
Dialog resizing bug. #119797 10/05/05 01:16 AM
Joined: Jan 2003
Posts: 87
T
Tat Offline OP
Babel fish
OP Offline
Babel fish
T
Joined: Jan 2003
Posts: 87
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.

Re: Dialog resizing bug. #119798 10/05/05 04:33 AM
Joined: Nov 2003
Posts: 228
S
Seifer Offline
Fjord artisan
Offline
Fjord artisan
S
Joined: Nov 2003
Posts: 228
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.

Re: Dialog resizing bug. #119799 10/05/05 05:05 PM
Joined: Dec 2002
Posts: 208
H
Hrung Offline
Fjord artisan
Offline
Fjord artisan
H
Joined: Dec 2002
Posts: 208
So try $dialog($dname).cw and $dialog($dname).ch, though I have no idea what purpose that script could serve anyway.


If I knew now what I will know then... maybe things will have been different...