dart - Polymer 1.0 - how to set icon position programmatically -
using polymer 1.0 , dart, have:
paperbutton paperbuttonforget = new paperbutton(); ironicon iconclear = new ironicon(); paperbuttonforget.innerhtml = "forget"; paperbuttonforget.children.add(iconclear); paperbuttonforget.raised=true;
the button produced shows "forget x"
i have 2 questions:
1) how can make show "x forget" in https://elements.polymer-project.org/elements/paper-button?view=demo:demo/index.html&active=paper-button
2) paperbuttonforget.raised=true; "doesn't work" - maybe need else...?
cheers steve
this way icon left , button shown raised:
import 'dart:html' dom; import 'package:polymer/polymer.dart'; import 'app_element.dart'; import 'package:polymer_elements/paper_button.dart'; import 'package:polymer_elements/iron_icon.dart'; import 'package:polymer_elements/communication_icons.dart'; /// [appelement] main() async { await initpolymer(); paperbutton paperbuttonforget = new paperbutton(); ironicon iconclear = new ironicon()..icon = 'communication:email'; paperbuttonforget.append(iconclear); paperbuttonforget.append(new dom.text("forget")); paperbuttonforget.attributes['raised']='true'; dom.document.body.append(paperbuttonforget); }
Comments
Post a Comment