nimarufa Posted November 5, 2018 Posted November 5, 2018 The default Location of Min value is on the bottom of trackbar and Max value is on the top. How can i invert it? I need to have Min value is on the top and Max value on the bottom. Quote
Sherzod Posted November 6, 2018 Posted November 6, 2018 Hello, You can use this trick, I think :) 1. UniTrackBar1 -> ClientEvents -> UniEvents -> function beforeInit: function beforeInit(sender, config) { config.plugins = new Ext.slider.Tip({ getText: function(thumb){ return Ext.String.format('{0}', sender.maxValue - thumb.value); } }) } 2. On the server side, something like this: Inverted value -> UniTrackBar1.Max - UniTrackBar1.Position Quote
nimarufa Posted November 6, 2018 Author Posted November 6, 2018 Thanks! for advice how to edit tooltip. It's a great idea!!! How can I set custom Tip string from the server side? Quote
Sherzod Posted November 7, 2018 Posted November 7, 2018 19 hours ago, nimarufa said: How can I set custom Tip string from the server side Hi, Something like this: 1. function beforeInit(sender, config) { config.tipTemplate = '{0}'; config.plugins = new Ext.slider.Tip({ getText: function(thumb){ return Ext.String.format(sender.tipTemplate, sender.maxValue - thumb.value); } }); } 2. On the server side: procedure TMainForm.UniButton1Click(Sender: TObject); begin UniTrackBar1.JSInterface.JSAssign('tipTemplate', ['{0}% complete']) end; Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.