Jump to content


Photo

Slider - Add Button Far Right

Slider

  • Please log in to reply
9 replies to this topic

#1 andyhill

andyhill

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 346 posts
  • LocationMelbourne Australia

Posted 15 February 2018 - 11:16 PM

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

Attached Files


  • 0

Andy


#2 Delphi Developer

Delphi Developer

    Advanced Member

  • Moderators
  • 4969 posts

Posted 16 February 2018 - 12:50 AM

Hi,

 

What kind of slider ?!


  • 0

#3 andyhill

andyhill

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 346 posts
  • LocationMelbourne Australia

Posted 16 February 2018 - 01:53 AM

The one used on Google Maps for ZOOM


  • 0

Andy


#4 Delphi Developer

Delphi Developer

    Advanced Member

  • Moderators
  • 4969 posts

Posted 17 February 2018 - 09:40 AM

Ok, I will try to analyze it
  • 0

#5 Delphi Developer

Delphi Developer

    Advanced Member

  • Moderators
  • 4969 posts

Posted 19 February 2018 - 05:17 PM

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,


  • 0

#6 andyhill

andyhill

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 346 posts
  • LocationMelbourne Australia

Posted 19 February 2018 - 09:48 PM

Thank You Farshad - very much appreciated.


  • 0

Andy


#7 andyhill

andyhill

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 346 posts
  • LocationMelbourne Australia

Posted 21 February 2018 - 02:15 AM

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


  • 0

Andy


#8 Delphi Developer

Delphi Developer

    Advanced Member

  • Moderators
  • 4969 posts

Posted 21 February 2018 - 07:30 AM

Ok, I will let you know
  • 0

#9 Delphi Developer

Delphi Developer

    Advanced Member

  • Moderators
  • 4969 posts

Posted 21 February 2018 - 09:22 AM

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;

  • 0

#10 andyhill

andyhill

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 346 posts
  • LocationMelbourne Australia

Posted 22 February 2018 - 12:56 AM

Perfect - thank you


  • 0

Andy






Also tagged with one or more of these keywords: Slider

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users