0
我正在设置带有标签和规则的dijit.form.HorizontalSlider
,我无法使显示器正常工作。滑块显示在规则和标签的顶部。我可以看到,标签和规则被放置的div没有高度属性,我猜这就是我的问题,但我似乎无法修复它。Dojo Horizontal Slider在标签上显示
下面的代码...
//create a div for the rule in my inner node div
this.ruleDiv = dojo.create("div", {}, dojo.byId("ruleDiv"), "first");
this.getInnerNode().appendChild(this.ruleDiv);
//create a div for the labels in my inner node div
this.labelsDiv = dojo.create("div", {},dojo.byId("labelsDiv"), "first");
this.getInnerNode().appendChild(this.labelsDiv);
//create the rule object
this.sliderLabelsRule = new HorizontalRule({
container: "topDecoration",
count: 10
}, this.getLabelsRuleDiv());
//create the labels object
this.sliderLabels = new HorizontalRuleLabels({
container: "topDecoration",
labelStyle: "font-size: 10px;",
labels: ["test0", "test1", "test2", "test3", "test4", "test5",
"test6", "test7", "test8", "test9"]
}, this.getLabelsDiv());
//create the slider
this.slider = new Slider({}, this.getInnerNode());
//startup the widgets
this.getSlider().startup();
this.getLabelsRule().startup();
this.getLabels().startup();
我试着换周围的东西,这个尝试一堆不同的方式,但我似乎无法找到正确的组合,任何帮助表示赞赏!
男人,我可以像一年前一样使用你。我不知道我是否能够解决这个问题,因为在项目结束的时候我已经接近尾声了,而且我从那以后就开始了。我会给你正确的答案,因为它是有道理的,希望它能在将来帮助别人。 – Shaded
谢谢,是的,我今天真的遇到了这个问题,当找到一个答案发现这个,所以一旦我终于想通了,我想我不妨将它发布在这里供将来参考 –