|
Joined: Dec 2003
Posts: 259
Fjord artisan
|
OP
Fjord artisan
Joined: Dec 2003
Posts: 259 |
I have a strange problem. I want to use scrolls in my dialog, so I used this dialog sample {
title "Sample"
size -1 -1 115 90
option dbu
;some other stuff
scroll "Scroll 1",10,63 32 40 11, horizontal
button "Accept",100,48 75 30 11,ok
button "Cancel",101,80 75 30 11,cancel
} but I can not move scrollbar. I tried also this On *:DIALOG:sample:scroll:10:{
echo -s "It's working!!!"
;some other stuff
} but still no luck. Can anybody help me and give me an example how to read scrollbar status and how to be able to move scrollbar right and left. Thank you!
|
|
|
|
Joined: Dec 2002
Posts: 1,245
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 1,245 |
you left out the "Range" setting
/dialog -m sample sample
dialog sample {
title "Sample"
size -1 -1 115 90
option dbu
;some other stuff
scroll "Scroll 1", 10, 5 32 105 10, horizontal range 0 100
button "Accept", 100, 48 75 30 11,ok
button "Cancel", 101, 80 75 30 11,cancel
}
on *:dialog:sample:init:0:{
did -c sample 10 50
}
|
|
|
|
Zarkov
|
Zarkov
|
you dont have the scroll bars range set, thats why you cant move it
alias sample { dialog -m sample sample }
dialog sample {
title "Sample"
size -1 -1 115 90
option dbu
;some other stuff
scroll "Scroll 1",10,63 32 40 11, horizontal range 0 100
button "Accept",100,48 75 30 11,ok
button "Cancel",101,80 75 30 11,cancel
}
On *:DIALOG:sample:scroll:10:{
echo -s "It's working!!!"
;some other stuff
}
Hmm bad timing with the reply 
Last edited by Zarkov; 11/03/06 05:09 PM.
|
|
|
|
Joined: Dec 2003
Posts: 259
Fjord artisan
|
OP
Fjord artisan
Joined: Dec 2003
Posts: 259 |
Thank you very much! And how do I read scrollbar state?
|
|
|
|
Joined: Dec 2002
Posts: 1,245
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 1,245 |
by state I'm guessing you mean its location (and value) added a little to your
alias sample dialog -m sample sample
dialog sample {
title "Sample"
size -1 -1 115 90
option dbu
text "", 8, 5 20 50 10, center
text "", 9, 55 20 50 10, center
scroll "Scroll 1", 10, 5 32 105 10, horizontal range 0 65535
button "Accept", 100, 48 75 30 11,ok
button "Cancel", 101, 80 75 30 11,cancel
}
on *:dialog:sample:init:0:{
did -c sample 10 32500
did -a sample 8 $int($did(sample,10).sel)
did -a sample 9 $int($calc(($did(sample,10).sel / 65535) * 100)) $+ %
}
on *:dialog:sample:scroll:10:{
did -ra sample 8 $int($did(sample,10).sel)
did -ra sample 9 $int($calc(($did(sample,10).sel / 65535) * 100)) $+ %
} the short answer is $did(sample,10).sel
|
|
|
|
|