i am trying to update the columname after doing some filter with red star.But is am not able to do it.Please help me to resolve this issue.
Styling in the column header is the same as anywhere else. You typically set a label on the column header cell that should be styled differently, and then register a custom painter for that label. And if you want to show a red star with black colored text, I suppose you need to decorate a TextPainter with an ImagePainter for the red star, or use a RichTextPainter, as the default TextPainter does not support different font styles.
Related
Using TextMeshPro, I would need to apply color to a specific section of the text but at the same time the default text has material color applied.
string text = "Here is default text with brown text\u003Ccolor=#4186FC>Blue text here\u003C/color>"
The problem is that the final result is the multiplication of both color and then the blue part resolves as almost black. If material color is white then no problem.
Would there be a way to cancel the material on this part without making two different text objects?
You are going to want to use Rich Text. For your example you'd want to use the <color> tag. Here's how it would look
string text = "Here is default text with brown <color=#4186F>Blue text here</color>"
There's a bunch of other parts of the text you can change in the same text field using these tags, so be sure to read into the link.
I have created a textbox in Word and can set various properties for it, such as position, text, text style, text horizontal alignment (left/right/center), color, and so on.
But I cannot find any settings to set the vertical alignment of text in the box to Top/Middle/Bottom. There's a button for vertical alignment on the ribbon to set that property, but I can't find it through the object inspector, through Intellisense, or through searching the net. I tried recording a macro, but the only line that showed up in the macro was the VBA line to select the textbox. Nothing else. :-(
The ribbon button is beside the "set text direction" option, but I couldn't find VBA for that setting either. I also tried the Textframe2 property, but saw nothing in there for vertical alignment.
Here's the code that sets the horizontal alignment of text. Also, I included the enum that I think I need to use. But I can't find the property to accept a value from the enum.
tbox.TextFrame.TextRange.ParagraphFormat.Alignment = wdAlignParagraphRight
WdVerticalAlignment enumeration (Word):
Name Value Description
wdAlignVerticalBottom 3 Bottom vertical alignment.
wdAlignVerticalCenter 1 Center vertical alignment.
wdAlignVerticalJustify 2 Justified vertical alignment.
wdAlignVerticalTop 0 Top vertical alignment.
Does anyone know the syntax for the property that I need to set to vertically align text inside a textbox shape? Thank you
The property is TextFrame.VerticalAnchor that uses the enumeration MsoVerticalAnchor
For example:
ActiveDocument.Shapes(1).TextFrame.VerticalAnchor = msoAnchorMiddle
(The enumeration mentioned in the question is for page layout.)
I want to display the required text field in star symbol
if user didnt enter any values it should change the Border color to red
if user enter values it should Change the Border color to green
Unfortunately you can't simply change border color of an item. You can change background nad text color.
You can simulate border color by adding new item which is 2 pixels longer and higher than your item. Place this item under your item and change its background color. It is not as difficult as it looks.
You can change color in WHEN-VALIDATE-ITEM on your item using builtin procedure SET_ITEM_INSTANCE_PROPERTY
I want to allow the entry of different coloured alpha numeric into a text box. The person clicks on one of four buttons (blue, grey, green or red) to select the colour and that colour applies to all alpha numeric entered into the text box until a new colour is selected (e.g., KPB - the K is blue and the PB is red; -6 is green).
Thanks,
Glyn
Hi #AndreiVolgin,
This is how I implemented your suggestion. I am working on getting the display a bit "nicer".
Thanks,
Glyn
You cannot style text inside a TextBox - even "::first-letter" selector does not work on it.
You can try to create your own widget which will include a transparent TextBox widget on top of a Label widget, where on each KeyUpEvent in the TextBox you update the Label widget with the corresponding text in different colors.
I am trying to read a value from my database, and depending on the character, have a different image show. Basically the values will either be b,r,g,or y for blue, red, green yellow and in the report I would like to show a colored circle corresponding to the entry. Does anyone know a quick way to do this? I am new to crystal reports. Thank you.
Circles are created using a rectangle (yes, really). Set the roundness=100%. Unfortunately, you can't hide/show (suppress, In Crystal's vernacular) a rectangle with conditional logic. Nor can you change its x and y values. So, for your purposes, its useless.
One option is to insert four, colored, images of circles. Suppress all but the one that you want to display.
Another option is to insert a text box, then add a circular, wingding character to it (Word can help w/ this). Use the text box's conditional formatting to change its color.
One additional suggestion to craig. You could:
create an image file for each of the coloured circles
add one of these coloured circles to the report
right click, format graphic
from the picture tab, select the formula editor for graphic location
enter a formula which looks for the relevant coloured circle image file
'C:\circles\' + {table.field} + '.jpg'
L