I am dealing with ExtJS 6 Tag field and I would like to set an auto-width in the suggested tags, because if the tag names are too short there will be a huge blank space in the field.
As far as I know it is supossed to work by using this two properties (but it does not work for me):
matchFieldWidth: false
shrinkWrap: true
The current behaviour is that the width is reduced and it breaks the lines, if the tag name is "This is a tag" it is shown in two different lines "This is" "a tag". Any ideas to achieve this goal?
Related
I need your help.
Now I am using AsciiDoc and AsciiDoctor to create some manuals.
I want texts smaller on some specific blocks, for example wide table, wide list, and so on, but not want main texts smaller.
Especially I need to make texts of wide tables smaller as my customer requests so.
Is there any way?
You mention lists and tables...
About lists, it can't be done as stated in AsciiDoctor Documentation:
Unsupported
Complex AsciiDoc markup is not permitted in attribute values, such as:
lists
multiple paragraphs
other whitespace-dependent markup types
As you can see, there it mentions multiple paragraphs, so while #EhmKah answer is a correct way to set a custom styling block, it won't be rendered as expected in a table/list as it's multi-paragraph.
The Built-in CSS class syntax is the way to go [small]#any phrases#
But in order to make this work in a table, you must set the cell type with a specifier in this case, the AsciiDoc specifier denoted by a
This means the cell (or column) will render supported AsciiDoc statements, attributes, etc.
Here's a working example:
[frame="none",grid="none"]
|====
a| image::images\logo.png[] a|[.small]#Autor: {author}#
|====
If you have tons of rows/columns, you don't have to manually apply the a to all of them. You can set the columns you need this behavior this way:
[cols="1a,2a",frame="none",grid="none"]
|====
| image::images\logo.png[] |[.small]#Autor: {author}#
|====
You can check its documentation for more about Column Formatting and you can check the Rendered table with variable widths and alignments sub section for more about AsciiDoc (a) and other specifiers.
docinfo.html + --attribute docinfo=shared
You can drop your CSS modifications into a file called docinfo.html:
<style>
/* Your custom CSS. */
</style>
and then build with:
asciidoctor --attribute docinfo=shared README.adoc
and that makes Asciidoctor 2.0.10 place docinfo.html at the bottom of the <head> element.
So you can override most of the default Asciidoctor style from there.
Then it's just a matter of understanding the generated HTML and previous style definitions to override them.
For image specifically, see also: How to set a custom image height for an image in Asciidoctor?
When you use a theme file, you can add a role to it like this:
role:
mycustomfont:
font-color: #333
font-size: 10
Now you can reference your newly created role right from your table cell:
a|[.mycustomfont]# some text #
I read something about
[small] and [%autofit] option https://github.com/asciidoctor/asciidoctor-pdf/issues/185 I never needed it so maybe you give it a try.
example-code
[small]
----
should be rendered in smaller font.
----
[%autofit]
----
really long text that doesn't want to fit on a single line with the default font size, so we'll make it shrink to fit.
----
enter image description here
We are automating the UI Application, Our UI application have Disabled Text are present, so we need to Validate the Disabled text. Before validating, I have to Print the Disabled text, Please guide me to how to print the text using Geb/Groovy.
Please find the Image of HTML tag which i highlighted is the Disabled text
BNSF0000712570
BNSF0000712570
The selector above will yield multiple results, i.e. elements, if there is more than one element that matches the classes used in the By.cssSelector query.
To get only the element containing "BNSF0000712570", I would suggest you try to get it using the "ext:qtip" attribute instead (which I assume is unique per element containing a disabled text) on the div containing the disabled text:
def myText = $(“div[ext:qtip=‘Id: 0001’]”).text();
println myText;
assert myText == "BNSF0000712570";
#Saurabh Gar: Why would you use the WebDriver "By" class selectors? With Geb you have access to a wide range of simpler ways to write selectors, e.g. like the one used above.
You should try using By.cssSelector as below :-
def text = driver.findElement(By.cssSelector("td.x-grid3-td-elementvalue").text
Or
def text = driver.findElement(By.cssSelector("div.x-grid3-col-elementvalue").text
assert text == "BNSF0000712570"
println text
Note:- If still doesn't get the text need to share table HTML insteadof screenshot that's why, could make a best locator.
Hope it helps..:)
Just about every field has a fieldLabel and a boxLabel config to set text either before or after the field. However, number field just happens to be one of them that does not. Is there anyway I can set text after a number field?
Example:
[ 1 ^] text goes here
Looks like this did the trick
afterSubTpl: 'this is after'
However it appears below the numberfield instead of directly to the right.
And this
beforeSubTpl: 'this is before'
puts the text above it, instead of to the left.
Working seeing if this can be fixed with styling.
Here is a TAG
The white block is the select field
Here is the select field selected
Here is the code
Why is it expanding out of it's limit ? there is nothing fancy there?
I think the problem is with your layout type.Which layout you are working with?Try it after removing layout config and add
xtype:'textfield',
anchor:50%,
itemId:'field'
If you are to use
selectfield.setHtml() and set it to a String.
It will destroy display and display the String ahs the value.
It's better to use setText() to do so.
In my application, I need to take input from the user for a column named 'body' in a table in the database.
My code in the .ctp file is:
echo $form->input('body',array('style'=>'width: 900px'));
In this way, i am able to specify the width of the body field which works fine. But, I want to specify the height as well.
I tried echo $form->input('body',array('style'=>'width: 900px height: 500px'));
echo $form->input('body',array('style'=>'width: 900px','style'=>'height: 500px'));
The first one doesnt work for either width or height and the second one modifies only the height but not the width.
Can someone please tell me how to overcome this issue.
Thank you very much in advance.
// in a css file.
.txtArea { width:900px; height:500px; }
// in your view
echo $form->input('body', array('class'=>'txtArea'));
would be the recommended and preferred manner.
Alternatively, make sure your inline CSS is correct:
echo $form->input('body', array('style'=>'width:900px; height:500px;'));
Your code appears to be missing a ;, and of course by specifying style twice you will be overwriting the previous value.