Skip to main content

How do I set the width of the Dojo combo box using JMaki?

2 replies [Last post]
jptarqu
Offline
Joined: 2007-11-17

How do I set the width of the Dojo combo box using JMaki? The default combo box is too small. I am using Ruby on Rails.

Thanks.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
gmurray71
Offline
Joined: 2003-07-31

Hi,

jMaki templates for the widgets are located in the /Public/resources directory.

In the case of the Combobox you can find the template at:

/Public/resources/dojo/combobox/component.htm

Then all you need to do is change the style on the input field like the following:

You can also modify the CSS selector that dojo uses:

.input.dojoComboBox {
border-right-width:0px !important;
margin-right:0px !important;
padding-right:0px !important;
width : 600px;
}

To do this you will need to create a component.css file in the same directory and add the code above.

Let us know if this does not work for you.

-Greg

jptarqu
Offline
Joined: 2007-11-17

Can I pass the width like :cmb_width => 800 when declaring the jmaki combo box in the rhtml page and then use ${cmb_width} in component.htm?