In flex how can someone add both bold and border? - apache-flex

I am trying to make a text area in flex 4.5. The problem is i need some part of it as bold not all. Also i need border.
A simple code is
<s:TextArea text="Text here1 Text here2">
By default s:TextArea contain border but I cant bold only one part of text that is "text here1"
If I try to use mx:TextArea Then I cant add border to it.
Please if anyone can help over how to add border along with if i can make only a part of text as bold or of different color etc.

Why can't you add a border to mxTextArea? There are a couple of ways:
specify borderStyle css property;
write a skin class, which draws a border and background you need, and assign it to borderSkin css property;
draw a 3x3 graphic skin and assign it to borderSkin css property.

Place a border container around the control

Use the textFlow property instead of the text property and you will be able to use rich text (bold, italics and so on).
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flashx/textLayout/elements/TextFlow.html

Related

QT combobox's item border is see throgh QAbstractItemView's radius

I would like to have a rounded rectangle shape of the popup by combobox, which is easy to implement as I add a "border-radius: 20px" to QAbastractItemView.( the 20px is just for easy identification for demo)
However, I also need to have a separator line between combobox items. I use item's bottom-border style to let items look like they have separator. But as you could see in the snapshot, there will be a extra bottom border appear behind QAbastractItemView.
How can I hide this extra bottom-border ? I search Qt's documentation, QSS has no :last-child or nth-child equivalent as in CSS. And there is no sub-control like ::separator, so I cannot sytle the separator.
Could anyone has some clue ? Thank you.

Flex ComboBox - Removing Borders

Does anyone know how to remove the small border around the combobox?
In a Flex3 Combobox (Halo Theme) there is this little gray border at the left, right, and bottom edges. I want to remove those borders so that the button part of the combobox doesn't have any border at all. Instead, I just want the top border.
Any ideas how it can be done?
Thanks.
I think you have to replace the Class that's used by default in the skin css property with one of your own. The docs say that is defined in ComboBase, so you'll need to look there to see what the Class is there and if you can extend or even do away with it (by setting skin to an empty ClassReference).

Change BorderContainer background color with AS - Flex 4

I'm trying to change the background color and or text color of a BorderContainer in flex 4 using Action Script, but have not idea how to.
The Border Container component doesn't seem to have any properties like:
idname.color = "#333333";
idname.backgroundcolor = "#333333";
How might I go about doing this?
thanks!
You can set styles (which are different from properties) in ActionScript like so:
idname.setStyle("backgroundColor", 0xff0000);
Not sure if this is the only way to do it, but by creating a css style your able to change the background, text color, and other style attributes and call the style's name in Action Script.
idname.styleName = "css-stylename";

How to highlight in flex

In flex, how can I highlight text/label? I have text and a small image that I want to highlight.
Easiest way is to add a glow filter around the UIComponents you want highlight.
Glow Filter
If you want to highlight part of the text, not so simple, you'll need to work it out in HTML and set the htmlText of the Label.

Flex text selection: does it have to be white on black?

When you select text in a Text or Label or TextArea (or other) control in a Flex application, the selection is shown in white text on a black background. Always.
I have a request to change that — and it seems to be a simple enough thing to want — but I can't find a style (or property) anywhere that permits that. Any ideas out there about how to do this, or reasons why it definitively can't be done?
Change TextField selection color in AS3
http://ericlin2.tripod.com/select/selectt.html

Resources