mIRC Home    About    Download    Register    News    Help

Topic Options
#136885 - 05/12/05 02:02 AM Dialog Scrolling
SnakeBite34 Offline
Ameglian cow

Registered: 05/08/05
Posts: 30
I've been fiddling around with the dialogs for practice but with large texts and filling them in using /did -a, I can't seem to scroll or select it like in the /uwho window. How exactly does someone do this?

Top
#136886 - 05/12/05 02:51 AM Re: Dialog Scrolling
RusselB Offline
Planetary brain

Registered: 03/08/04
Posts: 7252
Loc: Ontario, Canada
Not all dialog boxes are selectable. As for scrolling, vertical scrolling should come into play automatically as soon as the list of items exceeds the display area. Horizontal scrolling, I'm sorry to say, I've never been able to manage to get to work, although, in theory, if the text is longer than the width of the dialog box, then the horizontal scroll should come into effect automatically, like vertical scrolling does.

If you'd like me to be of more assistance, please provide the appropriate section of your code.

Top
#136887 - 05/12/05 03:04 AM Re: Dialog Scrolling
genius_at_work Offline
Hoopy frood

Registered: 08/10/05
Posts: 1741
You need to specify the hsbar/vsbar or autohs/autovs style in the objects you want to have scroll bars (hs = horizonal scroll, vs = vertical scroll). Example:

edit "",10,20 15 40 40,multi autohs vsbar

-genius_at_work

Top
#136888 - 05/12/05 03:19 AM Re: Dialog Scrolling
SnakeBite34 Offline
Ameglian cow

Registered: 05/08/05
Posts: 30
dialog test {
title "Test"
size -1 -1 800 300
tab "1", 1, 1 1 800 300
tab "2", 2
list 11 , 1 50 350 150, vsbar tab 1
Text "", 14, 355 82 400 68, tab 1
}
14 is the important part. To shorten the amount of things I have to provide, I will provide the pseudocode:

Clicking something in list 11 will trigger added lines to Text ID #14 which is read from an ini file. Each different item in the ini file, when read in the /did -a, is followed by a $crlf, so you could say it's somewhat like, /did -a (current text in id 14) $+ $crlf $+ (ini stuff here)

Note that the reading is not the problem. I could also do a different placing for each item, but that doesn't work either, and it's not very flexible.
Anyway, If I try to put in things that're very long into it, such as a link, it'll be cut off and things won't be viewable.


P.S. On another note, would someone care to explain how that dang scroll function works? (scroll "text", id, x y w h, style (top left bottom right horizontal range N N) ) I haven't been able to find any dialog tutorials with SCROLL function in it.


Edited by SnakeBite34 (05/12/05 03:27 AM)

Top
#136889 - 05/12/05 04:27 AM Re: Dialog Scrolling
genius_at_work Offline
Hoopy frood

Registered: 08/10/05
Posts: 1741
Here is a possible solution for your problem. Use the following line in place of your existing id-14 line:

edit "", 14, 355 82 400 68,multi read autovs autohs tab 1

That line will cause extra long lines to extend out past the end of the box. It probably has some disadvantages, but it seems to do what you are requesting. To add text to that object, use this command:

/did -a test 14 <new text goes here> $+ $crlf

Note that you don't need to add the existing text as the -a switch appends the new text to the end.

As for the SCROLL object, I don't think that I've ever used it, so I can't be much help there.

-genius_at_work


Edited by genius_at_work (05/12/05 04:31 AM)

Top
#136890 - 05/12/05 06:12 AM Re: Dialog Scrolling
RusselB Offline
Planetary brain

Registered: 03/08/04
Posts: 7252
Loc: Ontario, Canada
All that I can say, at this point, has already been said, by genius_at_work.

Top
#136891 - 05/12/05 11:59 AM Re: Dialog Scrolling
ClickHeRe Offline
Fjord artisan

Registered: 29/01/03
Posts: 249
Loc: Ottawa, Canada
I'll add my share: text controls don't have scrollbars.

You will need to use an edit control which could be stripped from it's borders to look like a text control and readonly so it's non-writable.
_________________________
David

DCX - Dialog Control eXtension

Top
#136892 - 05/12/05 05:25 PM Re: Dialog Scrolling
MikeChat Offline
Hoopy frood

Registered: 12/12/02
Posts: 1245
Loc: California, doooood
well, two things, I dont think the text function in the dialog was ment for use as a list (if thats what you are doing, adding items) plus it has a width limit that you specify, wider than that and it will be cut off

as for a listbox, did -z after you have filled it, or added to it

from the help: -z resets the width of horizontal scrollbar in listbox

on *:dialog:yourdialog:init:0:{
add stuff to list
did -z yourdialog listid
}

on *:dialog:yourdialog:sclick:listid:{
did -whatever
did -z (if the list has changed)
}

remember the text in the text "", n, 1 2 3 4

is only going to be as wide as the value of "3"

Top