Adjust fontSize of TextInput

Hey all,
I'm  using the "changed" event of a TextInput to do the following:
while ( Textfield.textWidth > Textfield.width ) {
     Textfield.setStyle( "fontSize", Textfield.getStyle( "fontSize" ) - 1 );
It should change the fontSize so the text always fits the width of the component without scrolling. But the value of textWidth doesn't change during the while condition, so the trace shows fontSize going down to -50000 and either Flash Player ends after 15 seconds or stops and the text is displayed with a height of 1 pixel. I've also tried adding a Textfield.validateNow() after the setStyle() statement, but no help.
Thanks in advane for any help with this!

Hi,
The Calendar Font setting is saved in the Outlook Data File. Once we reset the View of Outlook, the custom view settings including the Font setting are lost.
Make sure you haven't done these steps below, or you will lose the font setting:
1. When viewing the calendar, click the "Reset View" button.
2. Start Outlook with the "/cleanviews" switch.
Both steps above may let you lose the font setting.
Please also make sure there's no application except Outlook has access to your Outlook Data Files(.pst and .ost), 3rd-party programs that has access to Outlook Data Files may cause the issue as well.
In case the data file is already corrupted, run Scanpst.exe to scan and repair it to check if the problem will come back again. You can find the Scanpst.exe tool from one of the links below, depending on your Outlook and Windows version:
32-bit Windows
C:\Program Files\Microsoft Office\Office15
64-bit Windows
C:\Program Files (x86)\Microsoft Office\Office15
64-bit Outlook
C:\Program Files\Microsoft Office\Office15
Click-to-Run
C:\Program Files\Microsoft Office 15\root\office15
I hope the information is helpful.
Regards,
Melon Chen
TechNet Community Support
It's recommended to download and install
Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
programs.

Similar Messages

  • Safari not upgraded after moving to ios 5.

    Just upgraded to ios 5 but I don't see any of the new safari options.
    Any idea why?

    Safari has a lot of new features on iOS5 and they all work. Yet, like many of the new stuff in iOS5 you might find them only over time. There is not necessarily something "visible".
    - You can enable "Privacy Mode" ( once enabled Safari's UI turns black )  and "open links in background" in Settings -> Safari.
    - Websites that support "Reader" will feature an "Reader icon" in the adressbar, once clicked you will see the website as text only with adjustable fontsizes.
    -clicking on the "export/share" icon in Safaris statusbar below will open a menu that let's you mail the content of the website , tweet the link, add the site to "Reading List" and more.
    You might want to study the manuals for the new iPod touch ( which by all means is the 4g, only in white ) , all iOS5 features are described in there. Open iBooks.app ( freely from Appstore ) and search the store for "ipod touch". The user guide is a free ebook.

  • Spark TextInput field fontSize fails severely on iPad

    Also see the form post here because it is a related issue...
    http://forums.adobe.com/thread/774047
    Except for that in My case I am trying to use a TextInput field...
    <s:TextInput id="usernameInput" left="225" top="47" width="355" height="55"
                         borderVisible="false" contentBackgroundAlpha="0"
                         fontFamily="Omnes-Semibold" fontSize="25" color="#FFFFFF"
                         enabled="true" tabIndex="1" focusIn="textFieldChangeListener(event)" focusOut="textFieldChangeListener(event)"/>
    The problem is that whenever you publish an IPA file from the build, clicking on a TextInput with the iPad causes the font size to change to something like 200px+++++ (you can only see the tops of the letters) — when the TextInput loses focus the font size changes back to "25" like it is supposed to be.
    Nobody in our whole company can figure out what is going on here.
    I also cannot for the life of me figure out how to change the TextInput fontSize property using actionscript to FORCE it to be "25" when the field gains focus.
    Has anyone else had this issue?
    I either need to know how to change the fontSize property with actionscript or another way to solve this issue.

    We've tried so many ways of fixing this issue and nothing works. Setting up an event listener for focus_in and focus_out to explicitly set the font size as suggested in another thread does not work.
    I created TextInput fields, sized, and set up correctly in the Flash IDE and exported them to my swc library of UI assets and it still does not work.
    The font inside of the text field becomes GIGANTIC when you tap on the field to enter text (so large that only the very tops of characters are visible) — so large it would be the equivalent of entering "200"+ as a fontSize attribute.
    When the field loses focus, the fonts snap back to their intended specified size.
    This DOES NOT happen in the emulator, but when it is built into an IPA. The whole process to debug this issue is ridiculous — as we have to check in the code to SVN, which then does an automatic code check and release build, then we have to get the release build IPA onto the iPad and THEN (about 15+ minutes later) can see if a couple lines of code did anything to fix the problem.
    I've gone through this process about 6 times today in an attempt to debug this issue and NOTHING works.
    Has anyone else had this issue?
    In my opinion Adobe products have turned into complete GARBAGE since they finally established a quasi monopoly over the creative software tools industry — and Flash Builder in my limited experience is by far the biggest piece of trash in the collection. Even seasoned developers who are on my team agree with me — but we chose the AIR environment so we could roll out applications across the web / android / and ios without having to maintain completely different codebases.
    But my humble opinion aside — it would be nice if there was someone out there who experienced the same issue and knows the answer to fix it. I'd greatly appreciate any insight.

  • Spark datagrid item renderer - adjust height

    I am using a textinput as an item renderer for DataGrid:
    <s:GridColumn dataField="Comment" headerText="Comment"
                                                                                      itemRenderer="DataGridRenderer">
    </s:GridColumn>
    // Renderer
    <?xml version="1.0" encoding="utf-8"?>
    <s:GridItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
                                              xmlns:s="library://ns.adobe.com/flex/spark"
                                              xmlns:mx="library://ns.adobe.com/flex/mx"
                                              xmlns:gridEditorClasses="spark.components.gridEditorClasses.*"
                                              xmlns:ns="library://commons.stoneriver.com"
                                    >
              <fx:Script>
                        <![CDATA[
                                  override public function prepare(hasBeenRecycled:Boolean):void
                                            super.prepare(hasBeenRecycled);
                                            if (data)
                                                      if(data.FormCode == "")
                                                                Comment.text = data[column.dataField];
                                                                Comment.setStyle("backgroundColor", 0xFFFFFF);
                                                      else
                                                                Comment.text = "";
                                                                Comment.setStyle("backgroundColor", 0xB1CCF0);
                        ]]>
              </fx:Script>
              <!--- The renderer's visual component.          -->
              <s:TextInput id="Comment" width="100%" borderVisible="false" fontSize="{column.grid.dataGrid.getStyle('fontSize')}"/>
    </s:GridItemRenderer>
    How can I adjust a height of this renderer to fill the whole cell? Right now it comes out with a smaller height than a row height.
    Thanks

    I actually got word wrapping working with RichEditableText . But now when I specify height=100% all rows have the same extremely large height.

  • How can I adjust the font size in iTunes 11?

    How can I adjust the font size in iTunes 11?  Specifically, when in Artist view both the text in the sidebar and the track listing are huge.

    How to change fontsize in iTunes
    Take an XML-Editor and open:
    "C:\Program Files (x86)\iTunes\iTunes.Resources\de.lproj\TextStyles.plist"
    For other languages change your country code (de, en, fr, pl ...).
    Example for english:  "\en.lproj\TextStyles.plist".
    Backup this File !!!
    To change the Text-Size, change the integer value of the following item:
    "<key>size</key>"
    "<integer>8</integer>"
    This means Text-Size 8
    "<key>size</key>"
    "<integer>12</integer>"
    This means Text-Size 12
    To change the font, change the integer value of the following item:
    <key>font</key>
    <string>Arial</string>
    This means the font changes to Arial
    This also works:
    <key>italic</key>
    <true/>
    <key>bold</key>
    <true/>
    <key>underline</key>
    <true/>
    Example of common Text Properties:
    <!-- Artist View, Text Size In Artist List , Unselected -->
      <key>1033</key>
      <dict>
            <key>- loc hint -</key>
            <string>item table cell 3</string>
            <key>bold</key>
            <true/>
            <key>font</key>
            <string>Segoe UI</string>
            <key>size</key>
            <integer>8</integer>
        </dict>
      <!-- Artist View, Text Size In Artist List, Selected -->
      <key>1034</key>
      <dict>
            <key>- loc hint -</key>
            <string>item table cell 3 (bold)</string>
            <key>bold</key>
            <true/>
            <key>font</key>
            <string>Segoe UI</string>
            <key>size</key>
            <integer>8</integer>
        </dict>
    <!-- Album View Text Size, Titles Of Track List, After Click On Album -->
        <key>1021</key>
        <dict>
            <key>- loc hint -</key>
            <string>item track list 1</string>
            <key>font</key>
            <string>Segoe UI Semibold</string>
            <key>size</key>
            <integer>8</integer>
        </dict>
      <!-- Artist View Text Size, Titels Of Track List -->
        <key>1022</key>
        <dict>
            <key>- loc hint -</key>
            <string>item track list 2</string>
            <key>font</key>
            <string>Segoe UI</string>
            <key>justification</key>
            <string>right</string>
            <key>size</key>
            <integer>8</integer>
        </dict>
      <!-- Track Number Size, In Album And Artist View -->
        <key>1023</key>
        <dict>
            <key>- loc hint -</key>
            <string>item track list 3</string>
            <key>font</key>
            <string>Segoe UI</string>
            <key>justification</key>
            <string>right</string>
            <key>size</key>
            <integer>9</integer>
        </dict>
      <!-- Artist Text Size, In Album And Artist View -->
        <key>1024</key>
        <dict>
            <key>- loc hint -</key>
            <string>item track list 4</string>
            <key>font</key>
            <string>Segoe UI</string>
            <key>size</key>
            <integer>9</integer>
        </dict>
    <!-- Album View Text Size, Title Of Album Under The Cover -->
        <key>1001</key>
        <dict>
            <key>- loc hint -</key>
            <string>item grid 1</string>
            <key>bold</key>
            <true/>
            <key>font</key>
            <string>Segoe UI</string>
            <key>size</key>
            <integer>8</integer>
        </dict>
      <!-- Album View Text Size, Artist Under The Cover -->
        <key>1002</key>
        <dict>
            <key>- loc hint -</key>
            <string>item grid 2</string>
            <key>font</key>
            <string>Segoe UI</string>
            <key>size</key>
            <integer>8</integer>
        </dict>
    <!-- Titleview Textsize In Table -->
        <key>9002</key>
        <dict>
            <key>- loc hint -</key>
            <string>List Contents (Small)</string>
            <key>font</key>
            <string>Segoe UI</string>
            <key>size</key>
            <integer>8</integer>
        </dict>
    <!-- Title View Text Size, Title Of Album Next To Cover -->
        <key>9029</key>
        <dict>
            <key>- loc hint -</key>
            <string>List Contents (Small Bold)</string>
            <key>bold</key>
            <true/>
            <key>font</key>
            <string>Segoe UI</string>
            <key>size</key>
            <integer>5</integer>
        </dict>
    <!-- Textsize Playlist Sidebar Left Selected -->
        <key>1307</key>
        <dict>
            <key>- loc hint -</key>
            <string>playlists outline small font (selected)</string>
            <key>bold</key>
            <true/>
            <key>font</key>
            <string>Segoe UI</string>
            <key>size</key>
            <integer>3</integer>
        </dict>
    <!-- Textsize Playlist Sidebar Left Unselected -->
        <key>1304</key>
        <dict>
            <key>- loc hint -</key>
            <string>playlists outline small font</string>
            <key>bold</key>
            <true/>
            <key>font</key>
            <string>Segoe UI</string>
            <key>size</key>
            <integer>7</integer>
        </dict>
    Hope this helps.

  • TextInput in iOS gains then immediately loses focus won't open softkeyboard. FocusManager says still

    Dev Environment: Flash Builder 4.7<br/>
    SDK: Flex 4.6.0 (build 23201) AIR 3.5<br/>
    Arguments: -local en_US -swf-version=16<br/>
    Testing Platform: iOS 6 on iPad 2
    Severe bug, I believe.  Renders iOS apps developed using these technologies utterly unusable.
    Situation:  Whenever I touch the TextInput component on the testing platform device, it will do one of two things:
    It will perform as it is supposed to.  It gains focus (focusIn event dispatched), a blue focus rect surrounds it, the prompt text is replaced by a flashing cursor, the soft keyboard activates and is displayed (all expected events dispatched).
    It will fail.  It will gain focus (focusIn event dispatched), and the blue focus rect will appear briefly and then disappear, the prompt text remains displayed and there is no cursor in the field (focusOut event dispatched). The softKeyboardActivate event is dispatched and immediately the softKeyboardDeactivate event is dispatched.  The keyboard does not appear even briefly.
    I can tap tap tap tap and eventually one tap (no different than any other) will be successful and #1 will happen instead of #2.
    Here's the oddest thing.  The focusManager tells me that the DisplayObject that has the focus is the same object when the focusIn event is dispatched and after the focusOut event is dispatched (and if I check every 10ms using a timer, the results don't change... the correct DO has focus.
    Below the code is the trace output.
        <?xml version="1.0" encoding="utf-8"?>
        <s:ItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
                                    xmlns:s="library://ns.adobe.com/flex/spark"
                                    xmlns:mx="library://ns.adobe.com/flex/mx"
                                    xmlns:c="components.*"
                                    width="100%"
                                    creationComplete="creationCompleteHandler()">
            <fx:Declarations>
                    <s:DropShadowFilter id="dropShadowFilter" blurX="6" blurY="6" alpha="0.5" distance="6" angle="60" strength=".5" quality="{BitmapFilterQuality.HIGH}"/>
            </fx:Declarations>
            <fx:Script>
                    <![CDATA[
                            import flash.filters.BitmapFilterQuality;
                            import mx.utils.ObjectProxy;
                            import spark.skins.mobile.TextAreaSkin;
                            import views.tools.MakeAToolBase;
                            [Bindable]
                            private var pad:Number = 15;
                            [Bindable]
                            public var dataProxy:ObjectProxy;
                            [Bindable]
                            public var v:MakeAToolBase;
                            protected function creationCompleteHandler():void
                                    trace("LearnItListItemRenderer FUNCTION creationCompleteHander()");
                                    dataProxy = new ObjectProxy(data);
                                    dataProxy.choosePictureButton = choosePictureButton;
                    ]]>
            </fx:Script>
            <s:layout>
                    <s:HorizontalLayout horizontalAlign="center"/>
            </s:layout>
            <s:HGroup id="listItem" gap="33" paddingTop="15" paddingBottom="15" horizontalAlign="center" paddingLeft="15" paddingRight="44"
                              verticalAlign="middle" width="100%" height="210" filters="{[dropShadowFilter]}">
                    <s:Group height="100%">
                            <s:Rect height="100%" width="100%" radiusX="5" radiusY="5">
                                    <s:fill>
                                            <s:SolidColor color="0xffffff" alpha="1"/>
                                    </s:fill>
                                    <s:stroke>
                                            <s:SolidColorStroke weight=".5" color="0x000066"/>
                                    </s:stroke>
                            </s:Rect>
                            <s:Label text="{dataProxy.numberLabel}" fontSize="32" color="#000072" verticalAlign="middle" verticalCenter="0" paddingLeft="12" paddingRight="12"/>
                    </s:Group>
                    <c:ChoosePictureButton id="choosePictureButton" height="{listItem.height-pad-pad}" width="{(4*(listItem.height-pad-pad))/3}"/>
                    <s:VGroup id="textInputBoxesGroup" height="100%" width="100%">
                            <s:TextInput id="behaviorNameTextInput" color="#000000" textAlign="left" width="100%"
                                                    prompt="Enter Behavior Name..."
                                                    needsSoftKeyboard="true"
                                                    interactionMode="touch"
                                                    skinClass="spark.skins.mobile.TextInputSkin"
                                                    returnKeyLabel="done"
                                                    showPromptWhenFocused="true"
                                                    touchBegin="trace('touch');"
                                                    softKeyboardActivate=  "trace('#############################    SoftKeyboardActive    #####################################');"
                                                    softKeyboardDeactivate="trace('############################# SoftKeyboardDeactivating #####################################');"
                                                    softKeyboardActivating="trace('#############################  SoftKeyboardActivating  #####################################');"
                                                    focusIn="trace('TEXTINPUT FOCUSIN: '+this.focusManager.getFocus())"
                                                    focusOut="trace('TEXTINPUT FOCUSOUT: '+this.focusManager.getFocus())"
                                                    creationComplete="{data.behaviorNameTextInput=behaviorNameTextInput;}"
                                                    />
                            <s:Spacer id="behaviorSpacer" height="2"/>
                            <s:TextArea id="behaviorDescriptionTextArea"
                                                    fontFamily="verdana" fontSize="16"
                                                    verticalAlign="top" textAlign="left" width="100%" height="100%"
                                                    verticalScrollPolicy="on"
                                                    interactionMode="touch"
                                                    color="#000000" prompt="Enter Behavior Description..."
                                                    softKeyboardType="{SoftKeyboardType.DEFAULT}"
                                                    needsSoftKeyboard="true"
                                                    showPromptWhenFocused="true"
                                                    skinClass="spark.skins.mobile.TextAreaSkin"
                                                    creationComplete="{data.behaviorDescriptionTextArea=behaviorDescriptionTextArea}"/>
                    </s:VGroup>
                    <c:YesNoVerticalButtonsGroup/>
            /s:HGroup>
        </s:ItemRenderer>
    Trace output [ edited for brevity ]
        TEXTINPUT FOCUSIN: PictureToolsOnTheMoveMakeIt0.TabbedViewNavigatorApplicationSkin6.tabbedNavigator.TabbedVi ewNavigatorSkin8.contentGroup._PictureToolsOnTheMoveMakeIt_ViewNavigator3.ViewNavigatorSki n35.contentGroup.MakeAToolLearnItView471.SkinnableContainerSkin472.contentGroup.itemList.L istSkin475.Scroller477.ScrollerSkin478.DataGroup476.LearnItListItemRenderer566.listItem.te xtInputBoxesGroup.behaviorNameTextInput
        #############################  SoftKeyboardActivating  #####################################
        ############################# SoftKeyboardDeactivating #####################################
        TEXTINPUT FOCUSOUT: PictureToolsOnTheMoveMakeIt0.TabbedViewNavigatorApplicationSkin6.tabbedNavigator.TabbedVi ewNavigatorSkin8.contentGroup._PictureToolsOnTheMoveMakeIt_ViewNavigator3.ViewNavigatorSki n35.contentGroup.MakeAToolLearnItView471.SkinnableContainerSkin472.contentGroup.itemList.L istSkin475.Scroller477.ScrollerSkin478.DataGroup476.LearnItListItemRenderer566.listItem.te xtInputBoxesGroup.behaviorNameTextInput
        ############################# SoftKeyboardDeactivating #####################################
    [  FAILED ATTEMPTS 2 - 22 REMOVED FOR READABILITY ]
        TEXTINPUT FOCUSIN: PictureToolsOnTheMoveMakeIt0.TabbedViewNavigatorApplicationSkin6.tabbedNavigator.TabbedVi ewNavigatorSkin8.contentGroup._PictureToolsOnTheMoveMakeIt_ViewNavigator3.ViewNavigatorSki n35.contentGroup.MakeAToolLearnItView471.SkinnableContainerSkin472.contentGroup.itemList.L istSkin475.Scroller477.ScrollerSkin478.DataGroup476.LearnItListItemRenderer566.listItem.te xtInputBoxesGroup.behaviorNameTextInput
        #############################  SoftKeyboardActivating  #####################################
        #############################    SoftKeyboardActive    #####################################

    ..and I found this block on  my (flex 4.7) error log
    java.version=1.6.0_31
    java.vendor=Sun Microsystems Inc.
    BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
    Command-line arguments:  -os win32 -ws win32 -arch x86_64
    !ENTRY org.eclipse.debug.core 4 125 2013-03-11 14:44:53.687
    !MESSAGE An exception occurred while dispatching debug events.
    !STACK 0
    java.lang.NullPointerException
    at com.adobe.flexide.launching.multiplatform.MultiPlatformDebugPortManager.getPortForLaunchURL(MultiPlatformDebugPortManager.java:73)
    at com.adobe.flexide.multiplatform.ios.internal.IOSDebugLaunchListener.handleDebugEvents(IOSDebugLaunchListener.java:70)
    at org.eclipse.debug.core.DebugPlugin$EventNotifier.run(DebugPlugin.java:1117)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    at org.eclipse.debug.core.DebugPlugin$EventNotifier.dispatch(DebugPlugin.java:1151)
    at org.eclipse.debug.core.DebugPlugin$EventDispatchJob.run(DebugPlugin.java:415)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

  • Please, Help Embedding Fonts in TextArea , TextInput and Alert Components

    Please, forgive my bad english.
    Here is my problem (using Flash CS3 ActionScript 2).
    I have on the stage :
    • an instance of TextArea with Instance Name :
    message_ta
    • an instance of TextInput with instance Name : name_ti
    • and I have in the library an instance of Alert
    component, with default linkage Identifier : Alert
    for each one of this components I need to embed the same
    font.
    I already created a New Font in the library, choosing the
    font I want to use, giving it name "my_font" and size 8px.
    Now, please, can someone help me to write the actions to
    embed that font (my_font) inside the TextArea, TextInput and Alert
    components ?
    Thank you .

    You're right,my mistake, components don't have a font
    parameter, I was thinking of the textField. In any case you can use
    setStyle.
    1. Import the font(s) that you want to use into your movie's
    Library.
    2. Set each font's Linkage to be exported for Actionscript.
    Set the identifier name as you like
    3. Set your component(s) on the stage.
    4. Name each component instance.
    5. In a frame action space, define the style for each
    component:
    componentName.setStyle("fontFamily","fontName");
    componentName.setStyle("fontSize",12);
    componentName.text = "hello";
    componentName.embedFonts = true;
    There is a section in the online help that lists the various
    style properties that you can set for each component.

  • Adding an effect to a TextInput Control

    Is there any way to show the text in a TextInput control as though it was being typed in by a user? I have a TextInput defined as follows:
    <mx:TextInput id="message2Input"
            width="100%" height="40"
            text="Type Message Here..."
            fontSize="18"
            maxChars="10"
             />
    I can change the string value for message2Input.text elsewhere in my mxml application. When I do, that text will be displayed in the control. But it gets displayed in its entirety, instantly. I need to have it displayed as if it was typed for reasons related to a customer demo. So if the string is "Dexter, a very interesting guy", I want it to appear incrementally as
    D
    D-e
    D-e-x
    etc etc.
    I don't seem to find any control effects for TextInput that allow this when I search the discussion forums. Does anyone have an example where they have done this programmatically? I tried changing message2Input.text within a for loop, "growing" the display text with each loop until the entire string has been "typed in". But I still only see the final complete text string. I suspect this is because the TextInput control only handles one event, and won't loop through a series of re-posts in an event handler. But I'm new to this, and only guessing here.
    This is the private function in my Flex mxml app that I use to post the message to the TextInput display:
    protected function _insert_chat_item_0(): void
                // this sets the delay to display of the next IM item in the sequence...      
                aoTimers.push(setTimeout(_insert_chat_item_1, 2000));
                // this sets the text that appears in the "I'm typing text" window...
                // TODO: can we make this appear like it is being typed? Have tried everything, with no luck
                message2Input.text = "Dexter, a very interesting guy";
            } // _insert_chat_item_0 for demo: Tom types in his initial message to John
    Thanks very much.
    -Jim

    Try using Jumpeye components. They provide swcs for flex use. Lot of  effects and animations are present.

  • Drag and drop data from datagrid to textInput with flex.

    Hi,
      Cay please help me out on this problem..
      I have a datagid with some values..I have a textInput on the UI..
    There is one "+" button on the UI..when i click on that button it will add one more TextInput box to the UI below the first TextInput..Like thiseverytime  when you click on the "+" button it will add one more TextInput to the UI just below the previous one..
    Now i want to drag the values from datagrid to Textinput boxes..User may drag two or more vlaues to each textInput upon his requirement..
    How can i drag ...could you please help me out on thi issue....
    I am not able to drag the values to TextInputs:
    Here is my code:::Could anyone please help me...
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"   width="100%"  height="100%" creationComplete="init()">
    <mx:Script>
                <![CDATA[
                    import mx.containers.HBox;
                    import mx.controls.Alert;
                    import mx.managers.PopUpManager;
                //    import Components.testPopUpWindow;
                    import mx.core.UIComponent;
                    import mx.containers.TitleWindow;
                    import mx.core.DragSource;
                   // import mx.core.IUIComponent;
                    import mx.managers.DragManager;
                    import mx.events.DragEvent;
                    import mx.controls.Alert;
                    import mx.controls.Text;
                    import flash.geom.Point;
                 import mx.collections.ArrayCollection;
                 [Bindable]
                private var dpFlat:ArrayCollection = new ArrayCollection([
                                     {JobName:"A"},
                                    {JobName:"B"}, 
                                    {JobName:"C"},
                                    {JobName:"D"}, 
                                    {JobName:"E"},
                                    {JobName:"F"},
                                    {JobName:"G"}]);
                  private function box_addChild():void
                        var box:HBox = new HBox();
                           box.width=716;
                           var descriptionTextInput:TextInput = new TextInput();
                           var strButton:Button=new Button();
                          strButton.label="Submit";
                         descriptionTextInput.width=174;
                         descriptionTextInput.height=58;
                         box.addChild(descriptionTextInput);
                        /*     box.addChild(strButton); */
                        //    strButton.addEventListener(MouseEvent.CLICK,submitButtonClicked);
                         interactiveQuestionsVBoxID.addChild(box);
          public function init():void
            this.addEventListener( DragEvent.DRAG_ENTER, acceptDrop );
            this.addEventListener( DragEvent.DRAG_DROP, handleDrop );
          public function acceptDrop( dragEvent:DragEvent ):void
            if (dragEvent.dragSource.hasFormat("items"))
              DragManager.showFeedback( DragManager.COPY );
              DragManager.acceptDragDrop(TextInput(dragEvent.currentTarget));
          var pt:Point;
          public function handleDrop( dragEvent:DragEvent ):void
           // var dragInitiator:UIComponent = dragEvent.dragInitiator;
            //var dropTarget:UIComponent = dragEvent.currentTarget as UIComponent;
            var items:Array  = dragEvent.dragSource.dataForFormat("items") as Array;
            /* pt = new Point(dragEvent.localX, dragEvent.localY);
            pt = dragEvent.target.localToContent(pt);
            var img:TextInput = new TextInput();
              img.x=dragEvent.localX;   img.y=dragEvent.localY;
           // img.x=pt.x - Number(dragEvent.dragSource.dataForFormat("mouseX"));
              //img.y=pt.y - Number(dragEvent.dragSource.dataForFormat("mouseY"));
            img.width = 50;
            img.height=50;
            img.setStyle("fontSize",20);     // img.source="assets/" + items[0].id + ".png";
            img.text=items[0].JobName.toString();
             img.buttonMode = true;
             img.mouseChildren = false;
              TextInput(event.currentTarget).text=itemsArray[0].label;
             var itemsArray:Array = event.dragSource.dataForFormat("items") as Array; */
                    TextInput(dragEvent.currentTarget).text=items[0].label;
             public function beginDrag( mouseEvent:MouseEvent ):void
            var dragInitiator:TextInput = mouseEvent.currentTarget as TextInput;
            var dragSource:DragSource = new DragSource();
           // dsource.addData(this, 'node');
            dragSource.addData(this.mouseX, 'mouseX');
            dragSource.addData(this.mouseY, 'mouseY');
            //parent.addChild(dragImg);
            //dragSource.addData(mouseEvent.currentTarget.text, "txt");
            try{
                var dragProxy:TextInput=new TextInput();
                dragProxy.text = mouseEvent.currentTarget.text;
                   // Alert.show("Text isss"+dragProxy.text);
                   dragProxy.setActualSize(mouseEvent.currentTarget.width,mouseEvent.currentTarget .height)
                // ask the DragManger to begin the drag
                DragManager.doDrag( dragInitiator, dragSource, mouseEvent, dragProxy );
            catch(e){}   
                  ]]>
        </mx:Script>
    <mx:Canvas id="c1" width="100%" height="100%" y="10" x="10" >
    <mx:DataGrid id="d1" dataProvider="{dpFlat}"  x="10" y="119" dragEnabled="true"   dragMoveEnabled="true"  height="229" width="176"/>
    <!--<mx:Label id="lbl"   text="Job Name" width="195" height="28"  x="0" y="0" fontWeight="bold"/>-->
    <mx:Box id="questionLabelMode" direction="horizontal" width="270.5" height="24" y="76" x="211">
        <mx:Label name="Answer" width="173" text="Answer" fontWeight="bold"/>
        <mx:Button label="+" width="70" click="box_addChild();" fontWeight="normal"/>
        <!--<mx:Button label="-" width="71" fontWeight="bold" click="box_deleteChild();"/>-->
    </mx:Box>
    <mx:VBox id="interactiveQuestionsVBoxID" y="119"  height="100%" width="270.5" horizontalScrollPolicy="off" x="211">
                     <!--<mx:Box id="boxID" direction="horizontal" width="268" height="58">-->
                         <mx:TextInput id="t1" width="174" dragDrop="handleDrop(event)"    height="58"/>
                         <!--<mx:Button label="Submit" id="b1" />-->
                  <!--    </mx:Box>-->
    </mx:VBox>
            </mx:Canvas>
    </mx:Application>

    Hi Satya,
    I have done it for you ...please copy the below whole code and try to run the application. You can see the application working for you.
    You have done two mistakes --- you have added the event listeners on this object........but this refers to current object(i.e; your main application file but not TextInput).
    So you need to addEventListeners for your textinput "t1" but not to this...
    If you add the listeners on this then in your "acceptDrop" and "handleDrop" functions you will get the "dragEvent.currentTarget" as your main app but not TextInput(Since you have added listeners to "this "). If you addListeners on t1 then its correct.
    Also you need to add the eventListeners for the newly added textboxes as I done in "box_addChild" function in below code.
    Also in the handleDrop function the line of code where you are assigning the text is wrong ......it should be the below code...
    TextInput(dragEvent.currentTarget).text=items[0].JobName;
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"   width="100%"  height="100%" creationComplete="init()">
    <mx:Script> 
      <![CDATA[
                    import mx.containers.HBox;
                    import mx.controls.Alert;
                    import mx.managers.PopUpManager;
                //    import Components.testPopUpWindow;
                    import mx.core.UIComponent;
                    import mx.containers.TitleWindow;
                    import mx.core.DragSource;
                   // import mx.core.IUIComponent;
                    import mx.managers.DragManager;
                    import mx.events.DragEvent;
                    import mx.controls.Alert;
                    import mx.controls.Text;
                    import flash.geom.Point;
               import mx.collections.ArrayCollection;
               [Bindable]
               private var dpFlat:ArrayCollection = new ArrayCollection([
                                     {JobName:"A"},
                                    {JobName:"B"}, 
                                    {JobName:"C"},
                                    {JobName:"D"}, 
                                    {JobName:"E"},
                                    {JobName:"F"},
                                    {JobName:"G"}]);
                private function box_addChild():void
                    var box:HBox = new HBox();
                    box.width=716;
                    var descriptionTextInput:TextInput = new TextInput();
                    var strButton:Button=new Button();
                    strButton.label="Submit";
                    descriptionTextInput.width=174;
                    descriptionTextInput.height=58;
                    descriptionTextInput.addEventListener( DragEvent.DRAG_ENTER, acceptDrop );
           descriptionTextInput.addEventListener( DragEvent.DRAG_DROP, handleDrop );
                     box.addChild(descriptionTextInput);
                    /*     box.addChild(strButton); */
                    //    strButton.addEventListener(MouseEvent.CLICK,submitButtonClicked);
                     interactiveQuestionsVBoxID.addChild(box);
    public function init():void
         t1.addEventListener( DragEvent.DRAG_ENTER, acceptDrop );
         t1.addEventListener( DragEvent.DRAG_DROP, handleDrop );
          public function acceptDrop( dragEvent:DragEvent ):void
            if (dragEvent.dragSource.hasFormat("items"))
              DragManager.showFeedback( DragManager.COPY );
              DragManager.acceptDragDrop(TextInput(dragEvent.currentTarget));
          private var pt:Point;
          public function handleDrop( dragEvent:DragEvent ):void
           // var dragInitiator:UIComponent = dragEvent.dragInitiator;
            //var dropTarget:UIComponent = dragEvent.currentTarget as UIComponent;
            var items:Array  = dragEvent.dragSource.dataForFormat("items") as Array;
            /* pt = new Point(dragEvent.localX, dragEvent.localY);
            pt = dragEvent.target.localToContent(pt);
            var img:TextInput = new TextInput();
              img.x=dragEvent.localX;   img.y=dragEvent.localY;
           // img.x=pt.x - Number(dragEvent.dragSource.dataForFormat("mouseX"));
              //img.y=pt.y - Number(dragEvent.dragSource.dataForFormat("mouseY"));
            img.width = 50;
            img.height=50;
            img.setStyle("fontSize",20);     // img.source="assets/" + items[0].id + ".png";
            img.text=items[0].JobName.toString();
             img.buttonMode = true;
             img.mouseChildren = false;
              TextInput(event.currentTarget).text=itemsArray[0].label;
             var itemsArray:Array = event.dragSource.dataForFormat("items") as Array; */
              var currTarget:* = dragEvent.currentTarget;
              //interactiveQuestionsVBoxID = currTarget.getChildByName("interactiveQuestionsVBoxID");
                TextInput(dragEvent.currentTarget).text=items[0].JobName;
          public function beginDrag( mouseEvent:MouseEvent ):void
            var dragInitiator:TextInput = mouseEvent.currentTarget as TextInput;
            var dragSource:DragSource = new DragSource();
           // dsource.addData(this, 'node');
            dragSource.addData(this.mouseX, 'mouseX');
            dragSource.addData(this.mouseY, 'mouseY');
            //parent.addChild(dragImg);
            //dragSource.addData(mouseEvent.currentTarget.text, "txt");
            try{
                var dragProxy:TextInput=new TextInput();
                dragProxy.text = mouseEvent.currentTarget.text;
                   // Alert.show("Text isss"+dragProxy.text);
                   dragProxy.setActualSize(mouseEvent.currentTarget.width,mouseEvent.currentTarget .height)
                // ask the DragManger to begin the drag
                DragManager.doDrag( dragInitiator, dragSource, mouseEvent, dragProxy );
            catch(e:Error){}   
         ]]>
    </mx:Script>
        <mx:Canvas id="c1" width="100%" height="100%" y="10" x="10" >
      <mx:DataGrid id="d1" dataProvider="{dpFlat}"  x="10" y="119" dragEnabled="true"   dragMoveEnabled="true"  height="229" width="176"/>
      <mx:Box id="questionLabelMode" direction="horizontal" width="270.5" height="24" y="76" x="211">
          <mx:Label name="Answer" width="173" text="Answer" fontWeight="bold"/>
          <mx:Button label="+" width="70" click="box_addChild();" fontWeight="normal"/>
      </mx:Box>
      <mx:VBox id="interactiveQuestionsVBoxID" y="119"  height="100%" width="270.5" horizontalScrollPolicy="off" x="211">
        <mx:TextInput id="t1" width="174" dragDrop="handleDrop(event)" height="58"/>                    
      </mx:VBox>
    </mx:Canvas>
    </mx:Application>
    If this post answers your question or helps, please kindly mark it as such.
    Thanks,
    Bhasker Chari

  • Help to adjust font size on FORM

    Hi ,
    I am using APEX to do a online survey, some respondents said the survey form font size (default) is too small to read it clearly and don't know how to make the size look bigger.
    Then I realized they are right, the font size of APEX form is predefined in template. I am wondering how to make the font size adjustable like normal htm page. if it is not possible, then how could I put font-size in somewhere to make it bigger?
    Thanks in advance,
    Edited by: user12768285 on Mar 8, 2010 6:47 AM

    If you use Firefox with firebug you can exactly see where your fontsize has been set. You can override the standard CSS by either uploading and referencing your own CSS file or just add one inline CSS entry in your template.

  • Style Font in Spark TextInput Control

    Hello!
    How can I do as the title indicates please?
    Can I do it without using a custom skin because I want to be able to change fontColor and fontStyle programatically.
    Thanks!

    You can acheive it very easily with spark textinput too. Pls check below and let me know if you have any issue.
    <?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" minWidth="955" minHeight="600">
        <fx:Declarations>
            <!-- Place non-visual elements (e.g., services, value objects) here -->
        </fx:Declarations>
        <fx:Script>
            <![CDATA[
                import mx.collections.ArrayCollection;
                [Bindable]
                private var acFontSizes : ArrayCollection = new ArrayCollection([
                    {fontSize : '12'},
                    {fontSize : '16'},
                    {fontSize : '20'},
                    {fontSize : '24'},
                    {fontSize : '28'},
                    {fontSize : '32'},
                    {fontSize : '36'},
                    {fontSize : '40'},
                    {fontSize : '44'}
            ]]>
        </fx:Script>
        <mx:VBox>
                <s:TextInput id="txtInput" width="150" height="50" text="Your Text" fontSize="{comboFontSize.selectedItem.fontSize}" color="{colorCombo.selectedColor}"/>
                <mx:HBox>
                    <s:Label text="Choose Color"/>
                    <mx:ColorPicker id="colorCombo"/>
                </mx:HBox>
                <mx:HBox>
                    <s:Label text="Choose Font Size"/>
                    <s:ComboBox id="comboFontSize" dataProvider="{acFontSizes}" labelField="fontSize" selectedIndex="0"/>
                </mx:HBox>
        </mx:VBox>
    </s:Application>
    with Regards,
    Shardul singh Bartwal

  • Embedding .ttf font in Spark TextInput "prompt"?

    This is what i have:
    Main.mxml:
    <fx:Style source="Main.css"/>
        <s:TextInput x="72" y="95" focusColor="#CECB02" prompt="E-mail: "
                 skinClass="components.TextInputSkin"/>
    TextInputSkin.mxml:
    <s:RichText id="promptDisplay" includeIn="disabledWithPrompt,normalWithPrompt" x="10" y="7"
            color="#666666" fontFamily="Acens" fontSize="15" trackingRight="1"
            color.normalWithPrompt="#333333"/>
        <s:RichEditableText id="textDisplay" d:userLabel="Text Display" x="10" y="7" width="230"
            fontFamily="Acens" fontSize="15" heightInLines="1"
            width.normal="282" color.normal="#999999"
            tabStops.normal="S0 S50 S100 S150 S200" trackingRight.normal="1"/>
    Main.css
    @font-face
        fontFamily: Acens;
        src: url("C:\WINDOWS\Fonts\Acens.ttf");
        embedAsCFF: true;
    So, the "promptDisplay" in a computer(online) that does not have "Acens.ttf" installed shows the predefined one, but the inputed text is showed correctly with the embeded font!! Any explanation/solution for that!?
    Thanks ;-)

    Thanks for the reply
    It's predefined in "italic" and this font doesn't have it.
    But if it's like you are saying, why do i see it in my computer (even if the file it's in a server) with the font i choose and in "italic"!?
    Thanks again ;-)
    EDIT:
    Ok.. so i change the prompt fontStyle to "normal" and it works in every computer. ;-)
    But it's strange that in the local computer it does the transformation to italic when i want!! :S
    Thanks again ;-) problem "solved"

  • Set height to TextInput using CSS

    Hi,
    I am trying to standardize the height of TextInput control
    across my application. I tried to create this as a part of CSS
    file. However, the height property does not get recognized.
    TextInput
    height:18px; /*THIS PROPERTY IS NOT BEING RECOGNIZED*/
    paddingBottom: 0px;
    paddingLeft: 0;
    paddingRight: 0;
    paddingTop: 0;
    letterSpacing: 1;
    textDecoration: none;
    fontAntiAliasType: normal;
    textAlign: left;
    fontSize: 11;
    fontStyle: normal;
    fontWeight: normal;
    fontFamily: Arial;
    shadowDistance: 0;
    color: #000000;
    Please advise.

    "_funkyboy" <[email protected]> wrote in
    message
    news:ge786u$del$[email protected]..
    > He asked for a workaround. Can you provide an example of
    your suggestion?
    This uses the CSS property to do something that
    "traditionally" you'd do
    with CSS, but there's no reason you couldn't use similar
    logic to set the
    height:
    http://livedocs.adobe.com/flex/3/html/skinstyle_3.html

  • Script to put Datas from Database to TextInput

    Hello,
    As it is said in the title, I would like to put Datas from Database to Textinput. Here's my application :
    Well, what I want to do is when you click on the lines in the Datagrid, the "Nom Area" is completed by the Name in the Datagrid, the "adresse area" by the adress in the Datagrid ...
    Can someone help me ? please
    Thank you

    Here's my code
    <code>
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application
    xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:fourD="http://www.4d.com/2007/mxml" layout="absolute"  viewSourceURL="srcview/index.html" backgroundGradientAlphas="[1.0,1.0]" backgroundGradientColors="[#EDE3E3, #555555]" color="#040404" height="899">
    <mx:Script>
    <![CDATA[
    import fourD.sql.*;
    import mx.controls.Alert;
    import mx.rpc.events.FaultEvent;
    import mx.rpc.events.ResultEvent;
    [Bindable]
    private var _resultSet:SQLResultSet;
    // Initialisation de la connection
    private function connectHandler(event:Event):void
    fourDSQLService.execute("SELECT * FROM clients"); }
    private function resultHandler(event:ResultEvent):void
    if(event.result != null) { _resultSet = event.result as SQLResultSet; } }
    // En cas d'erreur
    private function faultHandler(event:FaultEvent):void
    var zeError:String= "Error #" + event.fault.faultCode;
    // Message d'erreur
    Alert.show(event.fault.faultString,zeError); }
    ]]>
    </mx:Script>
    <!-- Declaration du serveur SQL-->
    <!-- Connection automatique au dŽmarrage de l'application (login/mdp)-->
    <!-- ImplŽmentation des fonctions -->
    <fourD:SQLService id = "fourDSQLService"
    host = "127.0.0.1"
    userName = "sqlUser"
    userPassword="sql"
    autoConnect="true"
    result = "resultHandler(event)"
    fault = "faultHandler(event)"
    connect="connectHandler(event)"
    />
    <!-- Declare the 4D datagrid; It is also possible to use Flex embed datagrid -->
    <!-- Bind datagrid source to SQLresultSet coming from 4D-->
    <fourD:DataGrid id="contacts_dg"
    dataProvider="{_resultSet}" x="10" y="207" width="737" height="397"
    />
    <mx:Button x="588" y="627" label="Ajouter" id="btnAjouter"/>
    <mx:Button x="666" y="627" label="Supprimer" id="btnSupprimer"/>
    <mx:Text x="10" y="10" text="Nom" />
    <mx:Text x="10" y="36" text="Secteur d'activitŽ&#xd;"/>
    <mx:Text x="10" y="62" text="Groupe"/>
    <mx:Text x="10" y="112" text="Responsable commercial"/>
    <mx:Text x="10" y="88" text="Adresse"/>
    <mx:Text x="416" y="88" text="Ville"/>
    <mx:Text x="595" y="88" text="Code Postal"/>
    <mx:Text x="10" y="138" text="Responsable production&#xd;"/>
    <mx:Text x="416" y="112" text="Responsable 3"/>
    <mx:Text x="416" y="138" text="Responsable 4"/>
    <mx:Text x="624" y="10" text="Code"/>
    <mx:RadioButton x="610" y="34" label="Client"/>
    <mx:RadioButton x="675" y="34" label="Prospect"/>
    <mx:TextInput x="48" y="8" width="568" id="nomArea" />
    <mx:TextInput x="117" y="34" width="485"/>
    <mx:TextInput x="666" y="8" width="81"/>
    <mx:TextInput x="675" y="86" width="72"/>
    <mx:TextInput x="63" y="60" width="684"/>
    <mx:ComboBox x="157" y="110" width="251"></mx:ComboBox>
    <mx:ComboBox x="157" y="140" width="251"></mx:ComboBox>
    <mx:ComboBox x="512" y="110" width="235"></mx:ComboBox>
    <mx:ComboBox x="512" y="140" width="235"></mx:ComboBox>
    <mx:Text x="317.5" y="161" text="Liste Clients" fontSize="19"/>
    <mx:TextInput x="63" y="86" width="345"/>
    <mx:TextInput x="452" y="86" width="135"/>
    </mx:Application>
    </code>

  • Sking for TextInput problem

    Hey,
    im trying to have custom skin for spark TextInput and inside I'm using RichEditableText as follows
    <s:RichEditableText id="textDisplay"
                            multiline="{hostComponent.multiline}"
                            lineBreak="toFit"
                            color="{hostComponent.textColor}"
                            fontFamily="{hostComponent.fontFamily}"
                            fontSize="{hostComponent.fontSize}"
                            focusedTextSelectionColor="0xddf1f8"
                            left="6" right="1" top="4" bottom="1"
                            kerning="off"
                            heightInLines="{hostComponent.lines}"
                            >
        </s:RichEditableText>
    problem is that when i start typing it's never go to 2nd line only if I have press Enter key. What's wrong with it?
    Also I want to ask how work widthInChars and heightInLines parameters. I was thinking that if I have set widthInChars to 10, it will set maximum 10 chars per line, but it doesnt work like that...
    Im using SDK 14403

    If the Enter key isn't causing you to get a second line of text, then your databinding expression is probably setting 'multiline' to false.
    Have you read the ASDoc descriptions of how widthInChars and heightInLines work?
    Gordon Smith
    Adobe Flex SDK Team

Maybe you are looking for

  • Macbook to TV - Frame dropping

    I have recently purchased a new Sony 32" LCD TV that only has supports a frame rate of 50Hz. However, this means that when I attach my macbook via a VGA cable to the TV to playback things on my Mac every few minutes the frame drops off for a few seco

  • Blank screen when installing Windows 7 with Boot Camp - Mac Mini 2011

    I'm new to the Mac scene, having barely any knowledge on the OS. I've been trying to install Windows 7 via Boot Camp on my new Mac Mini (Latest offering from Apple). I have an External DVD Drive which I have been using, connected via two USB's to the

  • Best set up for file transfers?

    I am currently running a G4 Dual 533 as a file server and have placed my music, videos, and photos on it. I am set up via airport cards for wireless connections my issue is that this seems to be a very slow transfer speed. Even Itunes seems to have p

  • Jar files downloaded from SkyDrive are being renamed to jar.zip files

    I have cut and pasted the following series of exchanges from when I posted the problem onto SkyDrive's support forum. I hope that someone might be able to propose a better solution to the problem that I have. Thanks for your help. MDSms asked on Uplo

  • Parallelogram images showing up on exported PDF

    I'm exporting a PDF (map) from ArcGIS Desktop.  I've worked with Desktop for quite a number of years, and have exported hundreds of similar PDFs. During a print test I noticed what appears to be a white band running from one edge of the data frame to