I have seen many Alignment
But is their anything like Align Justify in Microsoft Word as in Blackberry for better viewing in Blackberry
i know there is TEXT_ALIGN_HCENTER and others but is there like Align Justify in BB for text display in Blackberry?
use RichTextField.TEXT_ALIGN_HCENTER in RichTextField property.it work same as you need.
RichTextField textData = new RichTextField("sample text",RichTextField.USE_ALL_WIDTH |RichTextField.TEXT_ALIGN_HCENTER );
Why dont u try this same logic for textfield as well.Hope it works!
add(new LabelField(" Name ",LabelField.FIELD_HCENTER | LabelField.NON_FOCUSABLE));
Related
Hi I wrote this code for a VISIO addin to create shapes and include text in it, here is a part of the code
visioRectShape.Text = "My text";
visioRectShape.get_CellsSRC((short)Visio.VisSectionIndices.visSectionParagraph,
(short)Visio.VisRowIndices.visRowFirst, (short)Visio.VisCellIndices.visHorzAlign).FormulaU = "0";
now i want to align this text to top and to the left and format the text to make it bold inside the shape.
with the above code I am able to align it to the left but not able to make it bold or align it to the top.
Can someone please help me with this.
You can use the macro recorder to figure out what operations Visio performs to achieve the formatting you want. To do so, click "Start recording", then perform your operations (set text bold, and align to the top), click "Stop recording", and examine the source code generated by the recorder.
You should see something like this:
' bold font
shape.CellsSRC(visSectionCharacter, 0, visCharacterStyle).FormulaU = "1"
' align top
Shape.CellsSRC(visSectionObject, visRowText, visTxtBlkVerticalAlign).FormulaU = "0"
Using C#
// bold font
visioRectShape.get_CellsSRC(
(short)Visio.VisSectionIndices.visSectionCharacter,
(short)0,
(short)Visio.VisCellIndices.visCharacterStyle).FormulaU = "1";
// align top
visioRectShape.get_CellsSRC(
(short)Visio.VisSectionIndices.visSectionObject,
(short)Visio.VisRowIndices.visRowText,
(short)Visio.VisCellIndices.visTxtBlkVerticalAlign).FormulaU = "0";
I'm trying to think how must i calculate the width of the text or if exist an easy way to do that in blackberry 4.5 in order to put the ... in the text. I'm using this to draw text:
graphics.drawText(auxString, row_height, y+row_height/2, DrawStyle.VCENTER, width-width/list_width_factor-(row_height+20));
Have you already tryed using DrawStyle.ELLIPSIS ? :
graphics.drawText(auxString, row_height, y+row_height/2, DrawStyle.ELLIPSIS, width-width/list_width_factor-(row_height+20));
I have a label field and 3 edit fields. I want characters entered in the label field to be on one line. Can anybody tell me how to do this?
You can check the length of the string using Font.getDefaultFont and call the function stringWidth passing in your label string. If the text is wider then the screen (use Display.getWidth), either make the font smaller or trim it to the size.
Another option is to implement your own field but that seems far more work... :)
Hi I'm using LateX. I have a block of text that I'd like to have a small box like space highlighting the are (just like a \begin{equation} but for text).
Is there such a thing in LateX?
I'm not 100% sure what you're asking I'm afraid, but if you just want to indent text with a margin on each side of the page to make it stand out, you can use...
\begin{quotation}
Quotation is good for long blocks of text that you want highlighted
\end{quotation}
\begin{quote}
Quote is suited to a single block of quoted text.
\end{quote}
If you actually want to have a physical black box around the text, you might want to consider wrapping it in a tabular / table, or you might want to delve into minipages and/or par box environments...
Is \makebox what you're looking for?
To create boxes of text that behave differently from the rest of the text, we can use
\makebox[width][pos]{text}
The width sets the width the of the box. The pos sets the positioning of the text - either r (right justified text), l (left justified), or s (stretched to fill the box). If the pos parameter is left out, as in \makebox[1in]{centerme}, the text is centered. The text is placed in the box. If you want to draw a box around the text, use \framebox just as you would use \makebox.
\mbox{text} and \fbox{text} are quick versions of \makebox and \framebox, which create a box to fit the size of the text.
There are some more examples at http://www.artofproblemsolving.com/wiki/index.php?title=LaTeX:Layout#Boxes
I would like to display my text in a text box in Reporting Services vertically bottom-up. I already can have it top-down by going to the WritingMode property of the text box and switching to 'tb-rl' but there is no option for bottom-up.
I have done some research and would really like to avoid creating an image and putting that into the text box...
Any thoughts?!
Thanks!
If you're using 2008 R2, you can choose Rotate270 under "WritingMode"
I am trying to do the same thing with vertical text bottom-up. Sadly 'tb-lr' isn't accepted as a valid value. I know you said you didn't want to create an image, but that appears to be the only solution. I ended up using the following to get the desired result.
Bottom-up Vertical Text