Servis-Rhino 4211B Betriebsanweisung Seite 151

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 298
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 150
text-align: center;
background-repeat: no-repeat;
}
Here is an example. In the <head> of the HTML page, we define a new Style:
<style type="text/css">
.myIcon
{
background-image:url("images/folder-open.png");
width:32px;
height:32px;
text-align: center;
background-repeat: no-repeat;
}
</style>
To show the button, we code:
<button dojoType="dijit.form.Button" label="Browse" iconClass="myIcon"></button>
The result looks like:
If we wish to hide the label, we can add the property:
showLabel: false
A button can be programatically added to a page with the following:
var refreshButton = new dijit.form.Button({label: "Refresh", onClick: getData});
dojo.byId("mytab").appendChild(refreshButton.domNode);
The width of a button can be changed but it is not as simple as expected. The following recipe will
work:
domStyle.set(query(".dijitButtonNode", button.domNode)[0], "width", "100px");
Another way to set the width of a button is to define the following CSS:
.wideButton .dijitButtonNode {
width: 100px;
}
and then add class="wideButton" to the Button.
If we wish a tooltip to be shown on the button, set its "title" attribute to be the text of the
tooltip.
The styling of a button can be overridden by setting the "baseClass" attribute.
A boolean property called disabled can be set to true which will disable button presses and
change its appearance to reflect that it is disabled.
dijit/form/RadioButton
A radio button is a button that can have an on or an off state. The state is available from the radio
button's "checked" attribute. In addition to having a state, each button also has a "value" found
from the "value" property. The buttons are usually grouped together such that when one is
switched on, the other is switched off. To group radio buttons together, have them be part of the
same "name" definition.
<input type="radio"
data-dojo-type="dijit/form/RadioButton"
name="drink"
id="radioOne"
checked
value="tea"/><label for="radioOne">Tea</label>
Page 151
Seitenansicht 150
1 2 ... 146 147 148 149 150 151 152 153 154 155 156 ... 297 298

Kommentare zu diesen Handbüchern

Keine Kommentare