Login Register

button

Adding my own icon to a button

I am trying to create my own button icon and have a small 28x26px gif image.

I created the style

.keyIcon  {
      background-image: url('smallkey.gif'); /* mega-image */
      width: 28px;
      height: 26px;
      }

and referenced it as

<button dojoType="dijit.form.Button" id="but2" iconClass="keyIcon">button 2</button>

but no icon appears.

What am I missing? Do all iconClass tags require a second parameter defining the offset as one does with the EditorIcons ?

Thanks

Font varies between buttons in IE

I made a small test program illustrating a Button, a ToggleButton, a ComboButton and a DropDown button inside a ToolBar. They are all displayed in FireFox using a serif font. In IE6 or IE7, the ComboButton and DropDown button are shown in a serif font, but the Button and ToggleButton in a sans serif font.

I assume this is a small error somewhere in a style sheet.

See for yourself:

button

Button doesn't display an icon in IE but it does in FF3. Why ?

I have this line in my code:

<div id ="b" value="borrar" dojoType="dijit.form.ToggleButton" iconClass="dijitEditorIcon dijitCheckBoxIcon"> borrar </div>

It works in FF3 when i click on the button but it doesnt work on IE6. Does anybody knows why ?

I'm using release 1.1.1

Thanks

Add button to div dynamically

I want to create a div dynamically and then create a dijit button and add it to the div.
I keep getting the error Node cannot be inserted at the specified point in the hierarchy" code: "3
Here is the code: What dumb thing am I overlooking?

//create the div
var fdiv= document.createElement("div");
fdiv.dojoType="dojo.dnd.Source";
fdiv.class="container";
fdiv.copyOnly="true";
fdiv.id="src1";
fdiv.jsId="c2";
document.body.appendChild(fdiv);

//create the button
var fparams = { label: "",
id: "but1",
showLabel: false
};

Trouble with dynamically created dijit.Menu and leftClickToOpen

I'm having trouble dynamically creating a dijit.Menu that opens with a left mouse button click. I have been successful dynamically creating a dijit.Menu that opens with a right mouse button click. I have also been successful declarative creating a dijit.Menu that opens with a left mouse button click.

I've include with this post some HTML that duplicates what works and what doesn't. The behavior of the HTML is the same in IE 6, FF 2/3, and Chrome. Hopefully, it will be simple to get up and running. Once it's running try the following...

dijit.form.Button onClick doesn't work inside an AccordionPane

Hi all,
I'm creating programmatically an AccordionContainer with several
AccordionPanes.
Each AccordionPane has the following content: a ContentPane with text and a dijit.form.Button.
My problem is that when an AccordionPane is selected and I click on
its button the event onClick is not triggered.
I'm using dojo 1.1.x.

The routine that creates the AccordionContainer is the following:

function handleResult2(response){
var content = response.getElementsByTagName("content");

Dynamic Tooltip on a Dynamic Button

I am trying to create a row of small buttons with tooltips. I can create the buttons fine by creating an array of divs, but if I add the code for creating a dynamic tooltip, taken from test_tooltip.html I get a dojo error:

Here's the code:

divs[i]= document.createElement("div");
divs[i].style.pixelLeft= i*50;
divs[i].style.height= 40;
divs[i].style.width= 40;
divs[i].id="but"+i;
document.forms[0].appendChild(divs[i]);
var params = { label: "x",
showLabel: false

};
var bt = new dijit.form.Button(params, divs[i]);
var tip =dijit.Tooltip(

Button Padding (Left/Right) Difference Between IE(7) and FF(2 or 3)

Hello All,

I have been strugling with a really annoying problem and figured I'd throw it out to the dojo community for some advice.

Currently I have a a set of buttons to control page content. They work fine and I have had moderate success adjusting their width BUT I cannot get IE and FF to have the exact same width buttons.

<button dojoType='dijit.form.Button'><div style='width: 6em;'>Submit</div></button>

Tooltips do not hide if button clicked

If you create 2 buttons near each other and assign them each a Tooltip, and then click on one of the buttons, the Tooltip stays there "forever" unless you click on the Tooltip or the background. Shouldn't they vanish after a second or so regardless of the button activity?

Click here
or here

Problem with button label

When i create a dijit button like this
Hi!

I always get a button with a label with a question mark in the previous line and then my label.

Something like this:
?
Hi!

Does anybody know why ? I haven't changed anything in the library because i am a beginner

thank you

Syndicate content