mIRC Home    About    Download    Register    News    Help

Print Thread
scroll option in dialogs, howto? #179287 20/06/07 11:28 AM
Joined: Aug 2005
Posts: 31
D
Div Offline OP
Ameglian cow
OP Offline
Ameglian cow
D
Joined: Aug 2005
Posts: 31
Hi all smile

Recently my list of options in a dialog has gotten too big to fit the height of my screen resolution, adding new tabs to split it up is not an option since I already done that.
Changing the width of the dialog aint an option either.

Now I noticed that the dialog options come with a "scroll" control.
So with that I can make my list of checkboxes as long as I want and just have it scroll vertically?

But I fail to see how that would fit into a code. Since i guess the scroll control needs to be locked on some other controls to scroll ofc?

Does anyone can post me an example scroll please, so I can see how it works...
Info and help so far from google and mIRC Help file have been insufficient.

Tnx alot in advance smile

Oh i'll post you some pseudo example of the info i need to be scrollable.

Code:
dialog scrolls {
  title "Scrolls Example"
  size -1 -1 160 121
  option dbu
  scroll "", 20, 4 3 148 114, range 0 0
  check "Check Box", 21, 9 7 50 10
  check "Check Box", 22, 9 21 50 10
  check "Check Box", 23, 8 36 50 10
  check "Check Box", 24, 7 53 50 10
  check "Check Box", 25, 6 67 50 10
  check "Check Box", 26, 7 78 50 10
  check "Check Box", 27, 6 92 50 10
  check "Check Box", 28, 8 107 50 10
  check "Check Box", 29, 8 117 50 10
}

As you can see, that last checkbox wont fit the dialog. ;-)
Let it scroll please ;-)

Tnx.

Re: scroll option in dialogs, howto? [Re: Div] #179300 20/06/07 03:45 PM
Joined: Jun 2006
Posts: 508
D
deegee Offline
Fjord artisan
Offline
Fjord artisan
D
Joined: Jun 2006
Posts: 508
You can't really do that as dialog items aren't able to be moved around, unfortunately.

One option could be to arrange the checkboxes into groups with shared positions, hiding some items and using the scroll to hide/show a "page" of options at a time.
Code:
dialog scrolls {
  title "Scrolls Example"
  size -1 -1 160 130
  option dbu
  scroll "", 2, 4 3 148 110, range 1 2
  check "Check Box1", 11, 9 7 50 10
  check "Check Box2", 12, 9 21 50 10
  check "Check Box3", 13, 8 36 50 10
  check "Check Box4", 14, 7 53 50 10
  check "Check Box5", 15, 6 67 50 10
  check "Check Box6", 16, 7 78 50 10
  check "Check Box7", 17, 6 92 50 10
  check "Check Box8", 18, 8 107 50 10
  check "Check Box9", 19, 8 117 50 10
  check "Check Box11", 21, 9 7 50 10, hide
  check "Check Box12", 22, 9 21 50 10, hide
  check "Check Box13", 23, 8 36 50 10, hide
  check "Check Box14", 24, 7 53 50 10, hide
  check "Check Box15", 25, 6 67 50 10, hide
  check "Check Box16", 26, 7 78 50 10, hide
  check "Check Box17", 27, 6 92 50 10, hide
  check "Check Box18", 28, 8 107 50 10, hide
  check "Check Box19", 29, 8 117 50 10, hide
}
on *:dialog:scrolls:scroll:2:{
  if $did(2).sel == 1 && $did(21).visible { did -h scrolls 21-29 | did -v scrolls 11-19 }
  elseif $did(2).sel == 2 && $did(11).visible { did -h scrolls 11-19 | did -v scrolls 21-29  }
}


Another may be to group the options into listboxes with the check style.
Code:
dialog scrolls2 {
  title "Listbox Example"
  size -1 -1 165 120
  option dbu
  list 1,5 10 75 100, check
  list 2,85 10 75 100, check
}
on *:dialog:scrolls2:init:0:{
  var %i = 1
  while %i < 30 {
    did -a $dname 1 Option %i
    did -a $dname 2 Choice %i
    inc %i
  }
}


control scroll in dialogs [Re: deegee] #188490 24/10/07 07:19 PM
Joined: Sep 2007
Posts: 6
N
Noot Offline
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
N
Joined: Sep 2007
Posts: 6
hi all,
i see this topic and i think to ask this request here.

I use the scroll, but i want to set the auto scroll for the control scroll.

I can do it?

Thanks

Noot