mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jul 2006
Posts: 4,149
W
Wims Offline OP
Hoopy frood
OP Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,149
Unsure if that's a bug but clicking on the tab of a dialog that is already the active tab doesn't trigger the sclick event, is this on purpose?


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Dec 2002
Posts: 5,420
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,420
Thanks for your bug report. Please provide a short script that reproduces the issue that you are reporting and I will try to reproduce it here.

Joined: Jul 2006
Posts: 4,149
W
Wims Offline OP
Hoopy frood
OP Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,149
Code:
dialog testing {
  size -1 -1 200 200
  tab "Tab1", 1, 2 2 198 198
  tab "Tab2", 2
  text "This is a text", 3, 120 5 70 15
}
on *:dialog:testing:sclick:*:{
  echo -s sclick triggered on dialog testing: $did 
  if ($did isin 12) .timer -ho 1 0 did -ra testing 3 This is a test
}
Click on tab 2, works, click on tab 1, works, now click on tab 1 again, it doesn't trigger. Like I said I'm unsure if it's a bug, it might be a good idea for mIRC to abstract this click event and not to trigger if the tab is already active, but as you can see that would help me, I use this tiny space in the dialog to display a text control, but since it overlap the tab control, I have to use a timer to redraw the text control when the tab control is redrawn (which happens when you click on the tab, even though mIRC doesn't trigger the event).


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Dec 2002
Posts: 5,420
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,420
Thanks. This is due to how some Windows APIs work, where if an item that is already selected is selected again, a Windows event is not triggered. In this case, the custom dialog tab feature is abstracted around mIRC's tab control. It would be possible to modify the tab control to get around this ie. to repeatedly send the slick event every time the user clicks the tab, even though it is already selected, but it would probably involve an ugly hack that attempts to bypass standard control events and its not clear what the side-effects would be on existing features.

Joined: Jul 2006
Posts: 4,149
W
Wims Offline OP
Hoopy frood
OP Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,149
I see, well if the API itself doesn't report the event, it's probably working as intended and not worth looking into it.


#mircscripting @ irc.swiftirc.net == the best mIRC help channel

Link Copied to Clipboard