cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

Toggle button size & shape change

Rakesh_kumar_S
11-Garnet

Toggle button size & shape change

i need this type of toggle button, how can i change the normal toggle button to this, anyone can help me?


MicrosoftTeams-image.jpg

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @Rakesh_kumar_S ,

you can use an css style definition in the app.scss (Studio Tab Application) to change the appearance of widget in generally .

2023-05-25_11-39-09.jpg

Example in PTC Help http://support.ptc.com/help/vuforia/studio/en/#page/Studio_Help_Center%2FWidgetToggle.html

2023-05-25_11-37-53.jpg

So when using styles you can change the appearance of widget e.g. here the toggle widget. There are classes used by default. So when you change these classes it will change all toggle widgets. Or you can use user defined classes (as in the example PTC Help) and set this in the class property of the toggle widget. In the first picture you can see that both is used. ptc-toggle and also the default where the class setting will override the system setting.

2023-05-25_11-45-10.jpg

To achieve the desired appearance you need to test setting of  different style properties  and see what is the caused change and if it is as desired. I  want also   refer to https://www.w3schools.com/howto/howto_css_switch.asp

https://alvarotrigo.com/blog/toggle-switch-css/

as example but also there are a lot of others links.

You can test  the effect of the change in the chrome debugging console (Strg-Shift-I)

2023-05-25_11-30-06.jpg

 

 

View solution in original post

2 REPLIES 2

Hi @Rakesh_kumar_S ,

you can use an css style definition in the app.scss (Studio Tab Application) to change the appearance of widget in generally .

2023-05-25_11-39-09.jpg

Example in PTC Help http://support.ptc.com/help/vuforia/studio/en/#page/Studio_Help_Center%2FWidgetToggle.html

2023-05-25_11-37-53.jpg

So when using styles you can change the appearance of widget e.g. here the toggle widget. There are classes used by default. So when you change these classes it will change all toggle widgets. Or you can use user defined classes (as in the example PTC Help) and set this in the class property of the toggle widget. In the first picture you can see that both is used. ptc-toggle and also the default where the class setting will override the system setting.

2023-05-25_11-45-10.jpg

To achieve the desired appearance you need to test setting of  different style properties  and see what is the caused change and if it is as desired. I  want also   refer to https://www.w3schools.com/howto/howto_css_switch.asp

https://alvarotrigo.com/blog/toggle-switch-css/

as example but also there are a lot of others links.

You can test  the effect of the change in the chrome debugging console (Strg-Shift-I)

2023-05-25_11-30-06.jpg

 

 

Thanks for your guidance.

Top Tags