[Project_owners] (no subject)
neil at parkwaycc.co.uk
Wed Sep 21 10:31:50 EDT 2005
Eric Jung wrote:
>I find the width of my XUL is directly related to the width of my widest control or label. This makes problems when I have very long text. My usual approach to solve this has been:
> <checkbox id="myId" oncommand="doSomething();">
> <vbox><label value="I'm a checkbox with a lot of text so "/>
> <label value=" mytext is wrapped vertically. I hope "/>
> <label value=" very much that you like it."/>
>But for checkboxes this doesn't work--the labels appear but the "box" of the checkbox doesn't. Is there a way to make this work for checkboxes, but more generally, is there a better way to solve the problem of line-breaking? CSS styles or... ?
Well, generically, you should use <label>I'm a lot of text but I can be
wrapped vertically if I am constrained horizontally</label> (or also
with <description>), but check boxes and radio buttons already do this.
Your issue is that their natural width is that of the unwrapped text
(what else could it be?) so you need to artificially impose a width on
them; for instance common dialogs use a max-width CSS style while
SeaMonkey's Preferences window has a preset width.
More information about the Project_owners