While $inrect was probably introduced for picwins it is definately not limited to them. It can be quite handy in any instance you want to track a mouse movement inside of a specefied area.

That being said I went ahead and made a small dialog to test this because as far as I could remember, hiding a bitton disables it. In my test I reached the same results. Even if the button was the default one, hiding it made it stop responding. No matter where I clicked all that was returned was an sclick of 0.

The code I used for the test is:
Code:
dialog test123 {
  title "Testing"
  size -1 -1 82 51
  option dbu
  button "Default", 1, 23 30 37 12
  button "1", 2, 23 30 37 12, hide
  button "3", 3, 23 12 37 12
  button "4", 4, 23 12 37 12, hide
}
on *:dialog:test123:sclick:*:{ echo -s $dname $did $devent }

I also used /did commands to hide and make visible all the ids indivudally while I was testing but when a button was hidden and no other button was left visible under it, I got "test123 0 sclick" for the "$dname $did $devent".

I personally don't know how else you can possibly check for a click somewhere that buttons are being hidden other than unhiding them or actually tracking the position of a mouseclick in the same area.

If you decide to try that just remember to make it react when the mouse movements are in the specefied area, whether you manually code it or use $inrect, and when $did == 0 so that you know all the buttons that would normally function are hidden without having to check them individually. If any button is visible then the sclicks $did will not == 0 due to it actually clicking a button that had its own id.

Anyhow, thats my idea, maybe someone else will have a better one.

Good luck.


I've gone to look for myself. If I should return before I get back, please keep me here.