Opened 14 years ago

Closed 14 years ago

#4475 closed defect (duplicate)

Form widgets: no way to set size

Reported by: guest Owned by: bill
Priority: high Milestone: 1.1
Component: Dijit Version: 0.9
Keywords: Cc:
Blocked By: Blocking:


There seem to be no proper way to set a widget size. It have been suggested on the forums to use css classes as a workaround, but that doesn't really work.

See <> for a test that try to use css classes to set size:

From the documentation, it is unclear if setting the size of a widget is even possible, so I don't even know if this is a defect or an enhancement request.

Change History (6)

comment:1 Changed 14 years ago by Adam Peller

likely a dup of #3058

comment:2 Changed 14 years ago by bill

Milestone: 1.1
Summary: No way to set dijit sizeForm widgets: no way to set size

Well, your bug summary is too general, because it's unclear which widgets you are talking about. For instance, you can set the size of the layout widgets easily (just look at any of the test files).

As for <input> type widgets, this is basically a dup of #4444.

For button widgets, the problem is the template, which is

  <div>  <button/> </div>

(The extra div is there for fancy styling; see the noir buttons for an example. Not sure if they can be done without that outer div.)

Anyway, currently I think (but haven't tested) that there's no way to set the size of a button except by embedding a sized object, like

<button dojoType=dijit.form.Button>  <div style="..."> ... </div> </button>

comment:3 Changed 14 years ago by guest

(I'm the submitter)

You are right that my issue are limited to Form widgets. I only tested with TextBox?, DateTextBox? and Button. Also, my issue is with widget created from javascript.

As a workaround, I set the padding of tundra widgets to a fixed pixel size (ie: padding:2px 3px), create each widget with a specific id and use a javascript created styleSheet to set the width (taking into account the padding). It seems to work for the 3 widgets I tested on.

comment:4 Changed 14 years ago by bill

(In [10663]) 1. Move validation icon to appear inside the box (for TextBox?, ValidationTextBox?, ComboBox?, and Spinner template based widgets).

  1. Width setting applies to outer node: setting combobox to width=100px leaves 16px

for the arrow icon and 84px for the input node (unless the error icon is shown, in which case the input gets less space). Size property desupported.

This is still rough; it needs some more CSS cleanup and haven't even looked at soria yet... but the basics are there.

Fixes #4444, #4512, #4489 Refs #4475, #4513

comment:5 Changed 14 years ago by bill

Owner: set to bill

I guess <input> type widgets are working but still need to try to get buttons to work.

comment:6 Changed 14 years ago by bill

Resolution: duplicate
Status: newclosed

Closed in favor of #5521 (and #4444).

Note: See TracTickets for help on using tickets.