Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Adjust slider range and bar width using script
#1
How to adjust the slider range and bar width of a component by using a script?

Use: to adjust the slider range and bar width.
Script area: connection
Script:
var len=changedItem.attributes.data.length;
var x=sdk.getWidget('timeline56' );
sdk.getWidget( 'timeline56').m_sliderheightratio=4.87;  //sliderheight
if(len>15)
{            
x.m_showslider=true;
var ab=((15*100)/len);
x.m_sliderrange=ab;  //sliderrange
             
}
else{
x.m_showslider=false;
if(changedItem.attributes.data.length<16)
{
x.m_controlbarwidth =40;
x.m_barwidth =40;
}
 
else {
x.m_controlbarwidth =45;
x.m_barwidth = 45;
}
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)