GWT textBox with different coloured alpha numerics - gwt

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.

Related

Apply color to text with material color

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.

Changing both Word Page Border Art Color

Is it possible to change both Word Page Border Art Color? I'm using one with blue and black, and I could only manage to change the black thin outer line.
With Interop, Microsoft released the Borders Interface.
There you'll find 2 members: InsideColor and OutsideColor, to return or set a value that indicates the 24-bit color of the inside/outside borders.

Setting color of padding for GtkAlignment

I have a GtkTextView inside a GtkAlignment, which I'm using to add top/bottom padding to the text view:
GtkAlignment
top-padding: 5
bottom-padding: 5
child: GtkTextView
Right now it looks like this:
So, it works, but the padding is gray and I want it to be white (ideally I want it to be “the color of the text view” in case the user has a custom theme, but white would do as well). Is there any way to do it?

Change the Text Field for Required Field in Oracle Forms 6i

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

Winform - How to make 3 rows with different colors

I am trying to make a Form with 3 rows, and make one of the rows with differnet color. The thing is when I try it, the row is not fully color`d, and the edges get the default background color.
Example:
http://puu.sh/i910v/51a6e5699a.png
How I want it to look like:
http://i.stack.imgur.com/fv2Rj.jpg
You could set the BorderStyle property of the form to None. This will remove the borders and the title bar, showing only the client area on which you are painting.
However to get the X (close) button at the top right, you'd have to place a button there yourself and close the application when pressed.