mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Aug 2003
Posts: 319
P
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
P
Joined: Aug 2003
Posts: 319
Is there any way to use /did to activate a custom dialog tab?

Joined: Apr 2010
Posts: 969
F
Hoopy frood
Offline
Hoopy frood
F
Joined: Apr 2010
Posts: 969
From the help file's Dialog -> Tab control section:

Quote:
You can use /did -fu to set the focus on a specific tab, [...]


Though looking at what the -u switch does, you may need to exclude it: /did -f ...

Last edited by FroggieDaFrog; 08/09/18 10:05 AM.

I am SReject
My Stuff
Joined: Aug 2003
Posts: 319
P
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
P
Joined: Aug 2003
Posts: 319
Originally Posted By: FroggieDaFrog
From the help file's Dialog -> Tab control section:

Quote:
You can use /did -fu to set the focus on a specific tab, [...]


Though looking at what the -u switch does, you may need to exclude it: /did -f ...


Tried loads of options - -f on the second or later tab shows the first tab with the focus on it, but when you use cursor keys to change the tab, it moves from the tab you selected.

So I guess this may be a bug...

Joined: Apr 2010
Posts: 969
F
Hoopy frood
Offline
Hoopy frood
F
Joined: Apr 2010
Posts: 969
Could you post a sample dialog with tabs to test against
nvm. after testing, it seems to be an issue with the init event:

Code:
alias test {
  dialog -m test test
}
dialog test {
  title "test"
  size -1 -1 200 200
  option map

  tab "a", 1, 0 0 200 200
  tab "b", 2
}
on *:DIALOG:test:init:0:{

  ;; doesn't work
  did -fu $dname 2

  ;; works
  .timer 1 0 did -fu $dname 2
}


Probably should make a bug report

Last edited by FroggieDaFrog; 08/09/18 11:15 AM.

I am SReject
My Stuff
Joined: Aug 2003
Posts: 319
P
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
P
Joined: Aug 2003
Posts: 319
My equivalent code:
Code:
dialog TestTabActivate {
  title TestTabActivate
  size -1 -1 100 100
  option dbu
  tab "Tab 1", 1, 2 2 96 96
  tab "Tab 2", 2
  tab "Tab 3", 3
}

on *:dialog:TestTabActivate:init:0: {
  did -f $dname 2
}

alias TestTab dialog -mdh TestTabActivate TestTabActivate

Joined: Aug 2003
Posts: 319
P
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
P
Joined: Aug 2003
Posts: 319
Putting the did -f on a timer 1 0 makes it work.

Code:
dialog TestTabActivate {
  title TestTabActivate
  size -1 -1 100 100
  option dbu
  tab "Tab 1", 1, 2 2 96 96
  tab "Tab 2", 2
  tab "Tab 3", 3
}

on *:dialog:TestTabActivate:init:0: {
  .timer 1 0 did -f $dname 2
}

alias TestTab dialog -mdh TestTabActivate TestTabActivate


So yes - an issue when run inside the Init event.


Link Copied to Clipboard