XUL element to break line - firefox-addon

I define a label and set its value
<bbox>
<label id="notify" value="Test"/>
</bbox>
The width of the label is fix so if the value (text) is longer then the width
I want the line to break. I tried it with css doing
word-wrap:break word;
But this does not work. Is there a XUL element that provides such a feature or do you know an other technique?

You can do this with either the <label> or the <description> element, but you need to use its textContent rather than its value.
<label id="notify">Test</label>

I believe a xul description is what you want.

Related

Break line defaultvalue of textarea

I have textarea with defaultvalue like this:
<textarea>
One Two Three
</textarea>
How can i display field like this:
One
Two
Three
Assuming you're referring to the placeholder, this has been answered on here: Insert line break inside placeholder attribute of a textarea?
Note there's no simple way, just some hacks that may work in some browsers and not others like using &#10 where you want the line break.
<textarea placeholder="one
two">
</textarea>
Depending on what you're going for you could set the width or use something like col="5" to force each word to the next line, but that also affects the user input.
My solution here
I replace space character by <br/> tag
Solution:
Break with \r\n with default text area. It will work.
"One\r\nTwo\r\nThree\r\nFour"

How to handle slider with hidden check box

I want to handle slider with hidden check box for scripts using watir.
Can any one help me to resolve this issue?
This would be more like visibility: hidden
Try setting the checkbox's opacity to 0. If you want the checkbox to be out of flow try position:absolute and offset the checkbox by a large number.
HTML
<label class="checkbox"><input type="checkbox" value="valueofcheckbox" checked="checked" style="opacity:0; position:absolute; left:9999px;">Option Text</label>
How many checkboxes do you have at this page? If there is only one then this might work:
browser.checkbox(attribute: attribute-value).when_present.set

Bootstrap input textfield are too small?

I dont have enough points to post a picture, but I am working on a project and the input text fields are way smaller than it is on the http://twitter.github.com/bootstrap/index.html site. I have <!DOCTYPE html> in the application.html.erb, but it still dont work.
Anyone got any idea on what the problem might be?
The width of textbox may be affected by the parent html tag's width. I cant be sure without seeing the html mark-up. The default width is defined in bootstrap.css for input text field. You can override this width by including desired span classes to the control like this..
<input type="text" class="span3" />
<input type="text" class="span12" />
It would be better to use the chrome inspector to check for the CSS rule for the input field. If that doesnt work, you can add a class or id to the input fields you need and then in a custom CSS file you can set the width of the class or id. This will change the size of your input field. Just make sure that your custom css file comes after the bootstrap css file.

How do we remove the inline style of SmartGwt components?

say: When we create a TextAreaItem inline style such as margin, width height etc are set are created along with a style name... How can we get rid of it?
<textarea handlenativeevents="false" oninput="isc_TextAreaItem_1.$43g()" tabindex="1052" wrap="SOFT" spellcheck="true" autocomplete="OFF" style="margin:0px;WIDTH:140px;HEIGHT:94px;-moz-user-focus:normal;" cols="10" rows="10" class="textItem" $9a="$9b" $89="isc_TextAreaItem_1" id="isc_5" name="isc_TextAreaItem_0"></textarea>
U can achieve this by setting setShowTitle to false
EG : textAreaItem.setShowTitle(false);
FormItem.setTextBoxStyle(String)
FormItem.setCellStyle(String)

Setting html controller to right side in firefox extension

I am creating Mozilla extension.
Here I need to set button controller right side in extension.
Here I divide XUL file to div element. I have take a main div element and inside this i have take two more inner div.
Then I have set one inner div style property float:left; and another div style property float:right. But this is not helpful for me.
Here I also set Button CSS style property float:right which is inside the div which have property float:right.
In a XUL window, dialog, page or vbox, elements are displayed from top to bottom, and if you put elements in an <hbox> then those are displayed left to right (except in RTL locales). But sometimes you want a right-aligned object. You then have several options:
The simplest version is <hbox pack="end"><button label="right"/></hbox>
If you also need an element on the left, then you can separate them with a spacer, like this: <hbox><button label="left"/><spacer flex="1"/><button label="right"/></hbox>
Alternatively you can also use <vbox align="end"><button label="right"/></vbox> which works better if you need a radio, checkbox, label or description element to be able to wrap.
Hi Dad you tried to use dir="rtl" this one can be applied to the document or the element ....
You can also specify the language... like it's exist on the HTML Specification...
http://www.w3.org/TR/html401/struct/dirlang.html
For Example
<Q lang="he" dir="rtl">...a Hebrew quotation...</Q>

Resources