Flex :: Modal Spark TextArea - Making Background To Appear?
Feb 21, 2011I want to make the background appear as if a modal window was opened but, instead of a window, I want to use Spark TextArea.. Is this possible?
View 1 RepliesI want to make the background appear as if a modal window was opened but, instead of a window, I want to use Spark TextArea.. Is this possible?
View 1 RepliesI want to be able to show a Spark TitleWindow container as a modal without having to construct it by code via AS3. I tried creating the TitleWindow before-hand manually by dragging and resizing it around and adding objects, etc then hiding it. Then on a button, I set the called function to the ones below:
public function doPopup():void {
testWindow.visible = true;
PopUpManager.addPopUp(testWindow, this, true);
}
Unfortunately, this only shows testWindow but not as a modal. I want it to be like this so that I can freely resize and design the layout of my TitleWindow and only have to call some function to show it as a modal one.
Is there any way for Making transparent the textarea component's background ?
View 14 RepliesI am using the below given code to try to make the transparency 0, but I still am unable to make the background become absolutely transparent.
<mx:Style>
global {
modalTransparencyBlur: 0;
[code].....
I am treating a spark TextArea as text input(by setting heightInLines="1"). The TextArea is part of an mxml component and I want to resize the component when the text is changed.
I haven't been able to use textArea.measureaText(textArea.text) to get line metrics and use it. I get this error "Parameter antiAliasType must be non-null."
Is there any way to get the width of a TextArea which it is going to consume at runtime for a particular string or a particular TextFlow?
I have done lots of searching on this subject, but it seems what I am finding is either out of date or just does not seem to work.With TextFields in the past, you could set the TextField to a certain width, set wordWrap to true and you would end up with a textfield that changed height according to the text you added.Now I am trying to do this with either the Spark TextArea or RichText.I tried this HeightInLines = NAN, but that seems to be out of date.I also tried this routine:
var totalHeight:uint = 10;
this.validateNow();
var noOfLines:int = this.mx_internal::getTextField().numLines;[code]....
But the mx_internal is not in the Spark components.I am trying to do this with AS3, not MXML.
Is it possible to get content of each line from spark's TextArea or RichText?
What I want to achieve it to split textarea's (or richtext) content into rows and modify some of them.
I have imported a Html text into textarea using Textconverter and it works well, but I have a problemI need to mark with "image not found" if and image inside into imported html isn't more online or simply don't exist
var string:String = '<img src="elvis.gif" />';
aTextArea.textFlow = TextConverter.importToFlow(string, TextConverter.TEXT_FIELD_HTML_FORMAT);
[code]........
The Below code is running well...
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" >
[Code].....
Then htmlText doesn't support Spark Textarea. Hence produces error. How does one go about displaying HTML formatted text with spark Text Area Property.
I want to get the line count of the spark text area content.
View 1 RepliesI'm trying to auto-resize a Spark TextArea using Flex Hero but having no luck.
EDIT: To clarify, I want to auto-resize the TextArea when typing, so there's never a scroll bar.
I'm trying to show a horizontal line under each row of text in a Spark TextArea. I want to give the text area the look of legal paper.
View 2 RepliesI can't seem to get TextArea to render any embedded fonts in project. I've searched online and have found a couple of instances of this issue but no solutions.
I have a few fonts embedded with my app. Spark Label & the mx:TextArea (switching embedAsCFF to 'false') will display them correctly so I know they're embedded OK. I have the fontFamily value in a binding but I even tried just instantiating a new TextArea then assigning one the the embedded fonts via the fontFamily style and have had no luck.
/* In my CSS file */
@font-face {
src:url("assets/fonts/UbuntuMono/UbuntuMono-Regular.ttf");
fontFamily: UbuntuMono;
[Code].....
I have a Spark TextArea:
<s:TextArea id="editor">
<s:textFlow>
<s:TextFlow id="_tf" >
<s:p>Lorem ipsum etc.</s:p>
[code]...
But still no joy in inserting into the middle. Also, the above code wouldn't replace highlighted text, but that's not the real concern here.Based on Eugene's link the key to this is EditManager.The following code represents the working updated function:
protected function imageBtn_clickHandler(evt:MouseEvent):void {
var em:EditManager = editor.textFlow.interactionManager as EditManager;
em.selectRange(editor.selectionAnchorPosition, editor.selectionActivePosition);
[code]...
I am writing a flex application and I have two Spark TextAreas. I want to create an EventListener so that when the user clicks on a text area, the text inside the TextArea is cleared:
this.addEventListener(FocusEvent.FOCUS_IN, onFocusIn);
private function onFocusIn(ev:FocusEvent):void {
if (this._showsCaption) {
[Code]....
Currently I can implement this with a Spark TextInput, but when I click on the TextArea, the focusIn event never fires and the onFocusIn() handler is never called.
The old method for the mx:TextArea no longer works. Specifically:
myMxTextArea.verticalScrollPosition = myMxTextArea.maxVerticalScrollPosition;
I've found this method for Spark but seems a bit kludgy:
mySparkTA.scrollToRange(mySparkTA.text.length-1, mySparkTA.text.length);
Is there a more straightforward way to do this?
I'm trying to remove all line breaks from the text that is pasted into the Spark TextArea.
I have:
<s:TextArea id="inputSearchQuery"
width="100%" height="22"
[code].....
I have a simple TextArea
[Code]..
Everything works as expected, but the undo buffer is reset / stops at the point that a tab was inserted.Is there a way to ensure that the undo buffer remains in tact even with the tab inserted
I am attempting to dynamically change the color of a subset/portion of text in a Spark TextArea control. Using the MX-based TextArea, I could leverage the mx.controls.textClasses.TextRange type and change the color directly as follows:
TextRange tr = new TextRange(theTextAreaControl, false, beginIndex, endIndex);
tr.color = somePredefindColor;
Input Parameters to TextRange constructor:
1st argument: The TextArea control that will provide access to the underlying textField property
2nd argument: Indicates the TextRange will not modify the content of the TextArea
3rd argument: The beginning index position in the TextArea text string
4th argument: The ending index position in the TextArea text string
How would I go about doing this for a Spark-based TextArea control? I am looking to dynamically change the font color for a range of text, not just the entire TextArea AND I cannot statically specify the font color. The problem I run into when trying to re-use the TextRange type is that the 1st argument is expected to provide the textField property, which is currently not on the Spark-based TextArea control. I thought about extending the Spark-based TextArea control to provide this accessor property but that seems like overkill and is probably not the best approach.
How do you scroll an editable TextArea (Flex Hero) on a touch device? I am referring to the situation where the text does not fit in the TextArea height.When I try to tap and drag the text gets selected and not scrolled... Am I missing a something here? I am using verticalScrollPolicy = on (also tried auto).I am testing the code in the Blackberry Playbook simulator (my targeted device for my app).
View 2 Repliesis there any way to change the black in background in the VideoPlayer component that comes with Flex 4 ?
I can change every color but i can't change the black in background.
I almost got it, but the part that's giving me trouble is making the header background transparent. I am making a custom MXML skin based on the default Spark DataGrid skin. I tried setting the contentBackgroundAlpha to 0 on the columnHeaderGroup and the headerRenderer, but that didn't work. I tried setting visible to false for either of those, but that made it so that the text didn't show up either, so that didn't work. There is no setting for backgroundAlpha in either of those two, so I'm not sure what else to try.
View 2 RepliesI am trying to change the background color and alpha of a link bar in a Flex/Flash 4 application. No matter what properties I define, the background of said link bar is always white.[code]
View 1 RepliesTrying to add some html to a TextArea in Mobile Flex 4.5 but keep getting the error:
"1180: Call to a possibly undefined method StyleableTextField."
For the following line:
StyleableTextField(txtMyText.textDisplay).htmlText = "sample <b>text</b>";
CustomAppSkin Class
<?xml version="1.0" encoding="utf-8"?>
<s:Skin name="CustomApplicationSkin"
xmlns:fx="http://ns.adobe.com/mxml/2009"
[code].....
I am using a spark textarea which has a dynamic feed from a database I am saving a template using TextConverter.export(editor.textFlow,TextConverter.TEXT_FIELD_HTML_FO RMAT,ConversionType.STRING_TYPE).toString(); and saving it via php its a longtext in mysql database. I am not using stripslashes or muniplating the text in any way and looking at the data in the database all the whitespace is still there.
When a users selects the template to bring it back into the textarea I am using TextConverter.importToFlow(repairedst,TextConverter.TEXT_FIELD_HTML_F ORMAT);
and all my spacing is gone.
The problem, as you can see, is that the text (height and width) is nothing like the Height and Width of the compoent (Spark TextArea) that I have set via the Main.mxml file in Flex 4. This is pissing me off so much because nobody can tell me why this is happening, or how to fix it. Text is dynamically added to the TextArea as people send messages in the server, hence the valueCommit line.I don't understand this, because I know it's not the fault of my fx:Script. I know this, because when I switch over to the Design tab of Adobe Flex Builder 4; the lines are just as messed up as in the screen shot.[code]
View 2 RepliesI have a custom component that extends mx:TextArea,but when I try and apply backgroundAlpha= "0" it says The style 'backgroundAlpha' is only supported by type 'components.LabelEditor' with the theme(s) 'halo'.I don't see anywhere specifying that it is not using the Halo theme, unless it has decided to extend s:TextArea despite my not importing it.How can I make this component accept the style instructions or achieve a transparent background some other way?
View 1 RepliestextChanged and valueCommit both event listener are attached with a spark textarea as follows:
addEventListener("textChanged",
function(event:Event):void {
colorize();
[Code]....
if I type any thing in textarea, then this colorize() function is called twice. How can I stop this one that both event should not be triggered together.
In the AdvancedDataGrid component, when you are in Edit mode in a cell, you can hit the Escape key to cancel editing (i.e. return to the previous value in the cell).I had expected the same behaviour while in Edit mode in both the Halo and Spark TextInput and TextArea components, and was surprised to find out that this is not the case.I looked at the attributes of all four components to see if this is something that I need to configure, but couldn't find anything.
View 1 Replies