This is a migrated thread and some comments may be shown as answers.

Longer "on" and "off" labels

1 Answer 630 Views
Switch (Mobile)
This is a migrated thread and some comments may be shown as answers.
Labhesh
Top achievements
Rank 1
Labhesh asked on 24 Jan 2018, 12:25 AM

Hi, seems like the switch cuts down display of labels to about three characters or so. 

Is there a way to resize the switch to hold more than three characters on either side of the display? I tried playing around with the css components, but it ends up messing up the switch layout.

Also, both on and off labels get capitalized automatically, I'd like them retain their original format

 

Here's the code I am using

 

$("#switch").kendoMobileSwitch({<br>                                            onLabel: "My On Label",<br>                                            offLabel: "My Off Label",<br>                                            change: onChange<br>                                        });

 

 

<p><div></p><p>       <input id="switch" checked="checked"/><br></div></p>

 

Thanks,

Labhesh

1 Answer, 1 is accepted

Sort by
0
Ivan Danchev
Telerik team
answered on 25 Jan 2018, 03:31 PM
Hi Labhesh,

Here's a dojo example, which shows how the Switch can be customized through CSS, in order to increase its width, display the specified labels and change the default text-transform value so that the label text is not displayed in uppercase.

Regards,
Ivan Danchev
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Switch (Mobile)
Asked by
Labhesh
Top achievements
Rank 1
Answers by
Ivan Danchev
Telerik team
Share this question
or