How to control the width and height of input field of a standard field? - visualforce

How to control the width and height of input field of a standard field? As of now I am controlling the width by using
style="width:500px"
But how to set the height?

You should use an textarea instead of input, you ca only manipulate the width of an input.

The same way, just use
style="width:500px; height:100px;"
You can also play with "font-size", "border" and "padding" to make it look good.
Here are some examples of it http://cssbutton.com/forms/
Stuff marked as CSS can be used in style="" tag, just as you did with width.

Related

How to detect dynamic text overflow in Birt

In Birt I have som dynamic text elements with fixed widths. I want to compare the text that will populate the element with the width of the element to populate the element with some other value when the text is too long. Is this possible?
No.
But AFAIK if you use the PDF emitter, you could determine the needed width of a given text in a given font/size with some iText API. But you have to take into account padding, margin etc. yourself.

How to draw text of known width and height inside onDraw(Canvas canvas) method

Here I am trying to make a Custom View containing text, I want to measure the text width and height so that I can also draw a background which fits the text of specific Measurment
I'm just taking a guess here, use wrap_content in layout_width and layout_height parameters in XML

jqgrid column resize after manually width change

i have a function where i manually set the width of a jqgrid column. If I after this want to use the resize handle, it adds or substracts relative from the original width size. So it doesn't see my new width to take as a base. I have tried putting the width and withOrg in the colModel without success.
I have a click handler inwhich i resize a column to a certain width on click. i set the width of the th trought JS. After this i would like to be able to use the .ui-jqgrid-resize element for resizing the column.
a short version of my code, say the th is 200px wide:
$('th').dblclick(function(){
$(this).width('100px');
});
after the user doubleclicked, and the th went smaller in size to 100px, the user uses the resize handle to widen the th 10px. The expected result is a th of 110px wide, but the thjumps to 210px wide. It adds the 10px the user wanted to add to the original state, not the state i have set with the doubleclick.
I would recommend you to use setColWidth method, from the plugin which I wrote before (see the answer), to change the width of the grid column. You can download the current version of the plugin from github.
If you trying to set the width of columns based on the width of the content of the column then I would recommend you to take a look at the demo created for the answer and read the answer too. I don't see the suggested code as final solution, but the demos shows my view on the problem and the ways to implement "autowidth" functionality.

How to limit the Textbox size in WP7?

In WP7 I am trying to limit the Textboxtext size.
Please guide me in this with sample.
You can limit it by Width or Height property. In this case TextBox will be only with provided sizes.
Otherwise, you can set MaxWidth and MaxHeight. In this case Width and Height will automatically adjust by situation but not great than you specify.
MaxLength property can be used also. It limits the number of characters that can be displayed. TextTrimming handles how to trim text when it out of screen, i.e. add ... in the end, for example.

dijit.FilteringSelect rich text label renders floats incorrectly?

I am using dijit's FilteringSelect box and trying to create a custom rich text HTML label, as per the documentation on dojocampus. I want my label to have the name of the object aligned to the left and a count aligned to the right. The way I am doing this is setting my label like so:
label: "left3 <span style=\"float:right;margin-top:-18px;\">right3</span>"
The problem is that when I hit the drop down menu, the right floated text appears about 20px below its associated left text. You can see an example of this here: http://jsfiddle.net/j9c3n/ The first FilteringSelect box contains the "buggy" behavior, the second box is my current workaround (adding margin-top:-18px) to the label.
Is this the correct behavior for the FilteringSelect label? Am I doing something wrong with the HTML? I tried including a <br style="clear:all;"> but that didn't help. I also tried setting all margins and padding to zero, as well as including a wrapper div around both the left and right text. All I can think of is that maybe the problem is the line height?
I guess my question is, Is this a bug in dijit.FilteringSelect, or am I just wrong thinking that the labels should all be vertically aligned?
Try this:
label: "<span style=\"float:right;margin-top:-18px;\">right3</span>left3 "

Resources