简体   繁体   中英

Forge Viewer Buttons Text

I have a bunch of comboboxes I am adding to the toolbar in the viewer that I want text for instead of an icon.

Currently the only way I can see of doing this is creating the styles with JS or adding inline styles with JS which if possible I want to avoid. Is there a way to set a text (or better yet html) to the button or is there a control better suited for this.

The standard toolbar button is designed to always use an icon as its content. As far as I know there's no official alternative to this control that would contain text instead, unfortunately.

With that said, you might be able to avoid custom styling by subclassing the Button class, removing the adsk-button-icon class from the button's this.icon object (which is a <div> element), and add the adsk-button class instead.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM