|
Joined: Aug 2005
Posts: 30
Ameglian cow
|
OP
Ameglian cow
Joined: Aug 2005
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?
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
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.
|
|
|
|
Joined: Oct 2005
Posts: 1,741
Hoopy frood
|
Hoopy frood
Joined: Oct 2005
Posts: 1,741 |
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
|
|
|
|
Joined: Aug 2005
Posts: 30
Ameglian cow
|
OP
Ameglian cow
Joined: Aug 2005
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.
Last edited by SnakeBite34; 05/12/05 03:27 AM.
|
|
|
|
Joined: Oct 2005
Posts: 1,741
Hoopy frood
|
Hoopy frood
Joined: Oct 2005
Posts: 1,741 |
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
Last edited by genius_at_work; 05/12/05 04:31 AM.
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
All that I can say, at this point, has already been said, by genius_at_work.
|
|
|
|
Joined: Jan 2003
Posts: 249
Fjord artisan
|
Fjord artisan
Joined: Jan 2003
Posts: 249 |
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.
|
|
|
|
Joined: Dec 2002
Posts: 1,245
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 1,245 |
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"
|
|
|
|
|