The sclick event is also activated when you click anywhere on the dialog surface. When you click on a portion of the dialog that is occupied by a BOX dialog object, it is registered as sclick on $did 0. As mentioned above, you can use the $inrect identifier to determine if the click falls within the rectangular area you are monitoring. The only problem I can foresee with this method is that the $inrect identifier uses pixels, and dialogs are usually made in dbu. Here is a sample using a pixel-based dialog:
Code:
alias test dialog -mv test test
dialog test {
title "testing"
size 100 100 -1 -1
option pixels
box "Testing", 10, 10 10 100 100
}
on *:DIALOG:test:sclick:0:{
echo -a > $inrect($mouse.x,$mouse.y,20,12,35,10)
}