Jump to content

Recommended Posts

Posted

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.

blob.png.9217d02105657829ce09086b26aeffac.png

Posted

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

 

Posted
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;

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...