Jump to content
uniGUI Discussion Forums
Sign in to follow this  
andyhill

Slider - Add Button Far Right

Recommended Posts

I have a need to add a button to a Slider (as per image) complete with tap event - please advise how - Thanks.

post-5752-0-11061000-1518736533_thumb.png

Share this post


Link to post
Share on other sites

Hi,

 

Can you try this solution for now ?!:

 

1. UniHiddenPanel1 -> UnimButton1

 

2. MainmForm -> OnReady:

procedure TMainmForm.UnimFormReady(Sender: TObject);
begin
  
  with UnimSlider1.JSInterface do
    JSCode(#1'.bodyElement.insertSibling('+ UnimButton1.JSName +'.element, "after");');

end;

Best regards,

Share this post


Link to post
Share on other sites

Taking this a step further, how would we do the very same thing to a mobile DBGridList slider ?

Share this post


Link to post
Share on other sites

Taking this a step further, how would we do the very same thing to a mobile DBGridList slider ?

 

1. UniHiddenPanel1 -> UnimButton1

 

2. MainmForm -> OnReady:

procedure TMainmForm.UnimFormReady(Sender: TObject);
begin
  UniSession.AddJS(
    'var slider = ' + UnimDBListGrid1.JSName + '.element.select(".x-docked-bottom").elements;'+
    'if (slider.length > 0) {'+
    '    Ext.getCmp(slider[0].id).bodyElement.insertSibling(' + UnimButton1.JSName + '.element, "after");'+
    '}'
  );
end;

Share this post


Link to post
Share on other sites
Sign in to follow this  

×