快速登录:  

Forum: General Discussion

话题: vertical scrollbar in splitpanel

由于该帖子已年深日久,可能包含陈旧过时或描述错误的信息。

Hi there,

ive generated a split panel into my skin with


<split name="loop" type="horizontal" position="0.6" grab="5">
<pos x="17" y="144+92" width="400" height="200"/>
<left>
......
......
</left>
<right>
.......
........
</right>
<separator close="right" closed="no" size="16" />
</split>


I want make the right area higher then the left area, but the visible part should be as high as on the left side. Is there a way to add a scrollbar to the right side? (a scrollbar like on the browser)

Thank you...
 

发表时间 Sat 05 Sep 20 @ 8:23 pm
It looks like it’s not possible, correct?
 

发表时间 Fri 11 Sep 20 @ 5:14 pm
If you think about it logically, a split divides a square or oblong shape into two, with a separator which can be dragged between the two parts to show more/less of each.

Therefore the two divisions need to be the same size.
 

发表时间 Fri 11 Sep 20 @ 5:22 pm
The sideview is a split and the sidelist inside the sideview has a scrollbar. I just need a similar thing, but not a list. It should be a custom area with a lot of custom buttons, which is scrollable up and down.
 

发表时间 Fri 11 Sep 20 @ 5:35 pm
djdadPRO InfinityDevelopment ManagerMember since 2005
Scrollbars are available only for the Browser lists. You cant create custom ones.
 

发表时间 Fri 11 Sep 20 @ 6:04 pm
> Scrollbars are available only for the Browser lists. You cant create custom ones
>> but not a list.

My idea was to generate a lot of custom buttons stacked vertically and scroll them up and down.
 

发表时间 Fri 11 Sep 20 @ 8:35 pm
NicotuxHome userMember since 2014
that may not be something impossible with a vertical slider used as the index of the first button to display (as far as the list of buttons is not too long)

will try that
 

发表时间 Fri 11 Sep 20 @ 10:16 pm

Scrolling like buttons
action is a mess, have to test the value of variable 'mylist_first' and execute depending on result

'param_cast int_trunc' is broken in this condition (do not do anything if elsewhere)
sizes are funky (maybe a rounding issue?)

my color choice is... psychedelic ... in a way to see what being written

after all it finally work
( the buttons are not named, because they would needs the same hack as action)
may be simpler using custom_buttons (and maybe multibuttons)

copy paste code to skin and call show it using :
 show_window 'scrolling_sliders' 



<define class="slidebutton" placeholders="*count,*index" x="+0" y="+[INDEX]*20" color="orange" width="50" height="20-2"
visibility="param_smaller [COUNT] `param_multiply 'get_var $mylist_first' [COUNT] & param_add [INDEX] & param_cast int_trunc`"
action="param_multiply 'get_var $mylist_first' [COUNT] & param_cast int_trunc & param_add [INDEX] & param_equal 0 ? video : param_equal 1 ? deck 1 cue_button : param_equal 2 ? deck 2 cue_button : param_equal 3 ? deck 1 play_button : param_equal 4 ? deck 2 play_button : param_equal 5 ? deck 1 play_pause : param_equal 6 ? deck 2 play_pause : param_equal 7 ? deck 1 stop : param_equal 8 ? deck 2 stop : param_equal 9 ? deck 1 mute : param_equal 10 ? deck 2 mute : param_equal 11 ? deck 1 volume +2% : param_equal 12 ? deck 2 volume +2% : param_equal 13 ? deck 1 volume -2% : param_equal 14 ? deck 2 volume -2% : nothing" >
<text size="13" color="white" align="center" format=" button #`param_multiply 'get_var $mylist_first' [COUNT] & param_add [INDEX] & param_cast int_trunc`"/>
<selected color="orange" color2="gray" gradient="vertical" shape="square" border="blue" border_size="1" radius="3"/>
<over color="green" color2="gray" gradient="vertical" shape="square" border="green" border_size="1" radius="3"/>
<off color="buttonup" color2="gray" gradient="vertical" shape="square" border="green" border_size="1" radius="3"/>
</define>
<define class="slidinglist" placeholders="*count=15,*visible=5">
<slider action="param-invert & set $mylist_first" width="30" height="[VISIBLE]*20" width="10" height="[COUNT]*10" rightclick="temporary" orientation="vertical"
dblclick="set $mylist_first 0%" frommiddle="false">
<off color="gray" shape="square" border="red" border_size="1" radius="3"/>
<on color="blue" shape="square" border="red" border_size="1" radius="3"/>
<mouserect x="-2" y="-10" width="34" height="[COUNT]*10/[VISIBLE]+20"/>
<fader width="30" height="[COUNT]*10/[VISIBLE]" color="orange" color2="black" gradient="vertical" shape="square" dblclick="[ACTION] 0% ? [ACTION] 50% : [ACTION] 0%">
<text dx="4" dy="1" text="≡>" fontsize="8*[COUNT]/[VISIBLE]" color="white" align="center"/>
</fader>
</slider>
<panel x="+34" y="+0" color="lightgray">
<button class="slidebutton" count="[COUNT]" index="0"/>
<button class="slidebutton" count="[COUNT]" index="1"/>
<button class="slidebutton" count="[COUNT]" index="2"/>
<button class="slidebutton" count="[COUNT]" index="3"/>
<button class="slidebutton" count="[COUNT]" index="4"/>
..... until max count
</panel>
</define>

<window name="scrolling_sliders" visible="yes" shown="yes" posx="400" posy="150" width="100" height="150" color="beige" border="green">
<panel class="slidinglist" x="+4" y="+0" width="30" height="150" action="nothing" text="31"/>
</window>

 

发表时间 Sat 12 Sep 20 @ 2:22 am
Wooooow, this looks great, ive tried it already.

How to make i scrollable with the mouse wheel? If i rotate the mouse wheel, then the fader jumps directly to the bottom position.

 

发表时间 Sat 12 Sep 20 @ 10:43 am
much more easy to define, just add action in choice

POST WHILE POSTING ^^ ;=) mouse: like this

badly sliders .... can go out of bounds 0..1 so that scrolling by roller is strange

no known way to get name of multibutton ?
but it somehow working
some confusion with multibutton and choice name though


<multibutton id="0" ><choice name="0" action="debug btn0 & deck 0 play_button" selected="yes"/></multibutton>
<multibutton id="1" ><choice name="1" action="deck 1 play_button" selected="yes"/></multibutton>
<multibutton id="2" ><choice name="2" action="deck 2 play_button" selected="yes"/></multibutton>
<multibutton id="3" ><choice name="3" action="deck 1 play_pause" selected="yes"/></multibutton>
<multibutton id="4" ><choice name="4" action="deck 2 play_pause" selected="yes"/></multibutton>
<multibutton id="5" ><choice name="5" action="deck 1 stop" selected="yes"/></multibutton>
<multibutton id="6" ><choice name="6" action="deck 2 stop" selected="yes"/></multibutton>
<multibutton id="7" ><choice name="7" action="deck 1 mute" selected="yes"/></multibutton>
<multibutton id="8" ><choice name="8" action="deck 2 mute" selected="yes"/></multibutton>
<multibutton id="9" ><choice name="9" action="deck 1 cue_button" selected="yes"/></multibutton>
<multibutton id="A" ><choice name="10" action="deck 2 cue_button" selected="yes"/></multibutton>
<multibutton id="B" ><choice name="11" action="deck 1 volume +2%" selected="yes"/></multibutton>
<multibutton id="C" ><choice name="12" action="deck 2 volume +2%" selected="yes"/></multibutton>
<multibutton id="D" ><choice name="13" action="deck 1 volume -2%" selected="yes"/></multibutton>
<multibutton id="E" ><choice name="14" action="deck 2 volume -2%" selected="yes"/></multibutton>

<define class="slidebutton" placeholders="*count,*index" x="+0" y="+[INDEX]*20" color="orange" width="50" height="20-2"
visibility="var_smaller '$mylist_first' 0 ? false : param_smaller [COUNT] `param_multiply 'get_var $mylist_first' [COUNT] & param_add [INDEX] & param_cast int_trunc`"
action="param_multiply 'get_var $mylist_first' [COUNT] & param_cast int_trunc & param_add [INDEX] & param_cast text & debug & multibutton">
<text size="13" color="white" align="center" format=" button #`param_multiply 'get_var $mylist_first' [COUNT] & param_cast int_trunc & param_add [INDEX]`"/>
<selected color="orange" color2="gray" gradient="vertical" shape="square" border="blue" border_size="1" radius="3"/>
<over color="green" color2="gray" gradient="vertical" shape="square" border="green" border_size="1" radius="3"/>
<off color="buttonup" color2="gray" gradient="vertical" shape="square" border="green" border_size="1" radius="3"/>
</define>
<define class="slidinglist" placeholders="*count=15,*visible=5">
<slider action="set $mylist_first" width="30" height="[VISIBLE]*20" width="10" height="[COUNT]*10" rightclick="temporary" orientation="vertical" direction="Down"
dblclick="set $mylist_first 0%" frommiddle="false">
<off color="gray" shape="square" border="red" border_size="1" radius="3"/>
<on color="blue" shape="square" border="red" border_size="1" radius="3"/>
<mouserect x="-2" y="-10" width="34" height="[COUNT]*10/[VISIBLE]+20"/>
<fader width="30" height="[COUNT]*10/[VISIBLE]" color="orange" color2="black" gradient="vertical" shape="square" dblclick="[ACTION] 0% ? [ACTION] 50% : [ACTION] 0%">
<text dx="4" dy="1" text="≡>" fontsize="8*[COUNT]/[VISIBLE]" color="white" align="center"/>
</fader>
</slider>
<panel x="+34" y="+0" color="lightgray">
<button class="slidebutton" count="[COUNT]" index="0"/>
<button class="slidebutton" count="[COUNT]" index="1"/>
<button class="slidebutton" count="[COUNT]" index="2"/>
<button class="slidebutton" count="[COUNT]" index="3"/>
<button class="slidebutton" count="[COUNT]" index="4"/>
..... until max visible count
</panel>
</define>

<window name="scrolling_sliders" visible="yes" shown="yes" posx="400" posy="150" width="100" height="150" color="beige" border="green">
<panel class="slidinglist" x="+4" y="+0" width="30" height="150" action="nothing" text="31"/>
</window>

 

发表时间 Sat 12 Sep 20 @ 10:47 am
as already explain in another thread...

replace action used for for slider

action="set $mylist_first"


with the abomination needed to keep the slider in range :

action="set '$mylist_first' & nothing & param_equal `get_var $mylist_first'` ? param_smaller 0.03125 ? param_bigger 0.0 ? : set '$mylist_first' 0 : : param_smaller 0.0625 ? param_smaller 0.03125 ? param_bigger 0.0 ? : param_smaller -0.0625 ? var_smaller '$mylist_first' 0.0625 ? set '$mylist_first' 0 :  : var_smaller '$mylist_first' 0.03125 ? set '$mylist_first' 0 :  : var_greater '$mylist_first' 1 ? set '$mylist_first' 1 :  : var_greater '$mylist_first' 1 ? set'$mylist_first'1 : "


and mouserect is wrongly calculated; use

				<mouserect x="-2" y="-10" width="34" height="[VISIBLE]*20+20"/> 


this way the slider scroll will stops at button0 and after button14
 

发表时间 Sat 12 Sep 20 @ 11:32 am
Thank you for these codes, ive learned a lot. But, one thing is strange:

If i feed a button with an action:
deck 1 play
it works.
If i feed a button with an action:
search_add 'Madonna'
it doesnt work anymore.

Im not sure, i guess it doesnt like the ' ' signs.
 

发表时间 Sat 12 Sep 20 @ 8:49 pm
NicotuxHome userMember since 2014
set a button with 'video' (no space) same effect

multibutton is working when call directly i.e.: from a pad or custom button

code is known to work because 'debug' is working as well as many other functions
but calling the button indirectly (as done here) seems to kill some actions (parameters issue)
 

发表时间 Sat 12 Sep 20 @ 11:34 pm


(陈旧帖子或论坛版块会自动关闭)