How to set a specific width to all the TextInputs used in a mxml file on its creation complete?

How to set a specific width to all the TextInputs used in a mxml file on its creation complete?

Hi subhajit nag,
I think the best approach would what I say is if you can make use of a Global variable or using a Singleton class having a variable which can be accessed globally through out the application.
Below is the sample what I am talking to:
So in below example you can access the variables textInputWidth and textInputHeight globally throghout the application since you have decalred them in main mxml file.
You can access these variabled in another mxml file as Application.application.textInputWidth and Application.application.textInputHeight. So if at all you are required to modify these values you are only required to modify at a single place in main mxml file..thats it.
If you are use any Singleton classes like ModelLocator you can place these variables in this class and refer from that class.
Hope this resoved your problem..
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical">
<mx:Script>
  <![CDATA[
   [Bindable]private var textInputWidth:int = 250;
   [Bindable]private var textInputHeight:int = 25;
  ]]>
</mx:Script>
<mx:Canvas id="canvas1">
  <mx:TextInput id="txt1" width="{textInputWidth}" height="{textInputHeight}"/> 
</mx:Canvas>
<mx:Canvas id="canvas2">
  <mx:TextInput id="txt2" width="{textInputWidth}" height="{textInputHeight}"/> 
</mx:Canvas>
<mx:Canvas id="canvas3">
  <mx:TextInput id="txt3" width="{textInputWidth}" height="{textInputHeight}"/> 
</mx:Canvas>
<mx:TextInput id="txt4" width="{textInputWidth}" height="{textInputHeight}"/>
<mx:TextInput id="txt5" width="{textInputWidth}" height="{textInputHeight}"/>
</mx:Application>
If this post answers your question or helps, please kindly mark it as such.
Thanks,
Bhasker Chari 

Similar Messages

  • How to set a specific starting time for the falling snow code snippet

    Hi everyone
    I want to use the falling snow code snipet but I don't want it it to start as soon the movie starts.
    So how to set a specific time to start the falling snow?
    Thanks
    Patricia

    put the code (that's not in a function body and excluding variable declarations and import statements) in a function body and call it using the timer class.

  • How to set FBL1N T code Layout to default to all the users using this T cod

    Dear Friends
    I have created a new layout by modifying the some of the fields in FBL1N T code output.  I want to set as default layout to all the users using this T Code. Is there any way we can set the  custom layout as default layout  to all the users.
    Presently Only I can see as default layout but  not the other users
    Thanks in Advance
    Thanks
    MVS

    Hi
    I have one above like issue but in FB03, I have been one layout as default using -lay admin when i come back and re execute the
    FB03 transaction  the default lay out not working directly every time i have to  "display as list from the" Go to" menu then only
    document showing as per lay out..I want  that lay out has to be work with out  going to Dispaly as list
    please advice me where i did wrong .its not working  even after the changes i log out the from the SAP and re login
    thanks
    Ranamka
    Edited by: Ranamka on Mar 10, 2011 9:59 PM

  • How to set displayed column width for a search help

    I have created an elementary search help for a custom field with a value table behind it.
    The search help functions correctly, but when displayed the column widths are all 10 characters. The user has to adjust the column to view the descriptive text.
    Can anyone tell me how to set default column widths for the help?

    Please  open you Elementary search  help  and see the Column  width   behind the Fields of your ...there  increase the width of the fields
    "Activate it  and refresh
    reward  points if it is usefull .....
    Girish

  • How to set user specific Layout for executing IW38/IW39  report.

    Dear Experts,
    We have 10 users seperatly, For executing IW38/39 transaction they have maintained seperate layouts for executing the reports. While saving layout they have saved the layout as 'user specific' Now some body has chage the settings.
    After changing the setting all are getting same layout.
    Please suggest how to set user specific layout. When user enter the IW38/39 report by default he should get his layout.
    Thanks in advance.

    Create Variant using SHD0 and with Group and assign to particular user's
    Here is the steps
    Creating a Variant Group
    1. Open transaction SHD0, enter the transaction code, and press enter.
    2. Choose the Standard Variants tab page, and then the sub tab page Variant Groups, and enter a group name, such as GROUP_GEN
    3. Choose Create. Enter a short text on the Maintain Variant Group window that appears and save the variant group.
    Assigning Users
    Once you have created the variant group and the relevant transaction variants with screen variants, you now need to assign users to the variant group as follows
    1. Return to the Standard Variants tab page, Variant Groups sub tab page.
    2. Enter the name of a user that you want to assign to this variant group, and choose Assign. A message that this user was successfully assigned to the variant group appears in the status bar. If you choose a where-used list for users, this user is displayed in the user list.
    3. However, for the screen variants of the variant group that you created above to be displayed for the user, you first need to select Set Proposal. The user is assigned to the group and the associated transactions are started with the corresponding variants only once you choose the Set Proposal function.
    You can use this procedure of user assignment for all other users that you want to add to the variant group
    Hope this helps.
    Thanks
    S.N

  • How do you change/adjust border width for all the cells in a table created in Pages?

    How do you change/adjust border width for all the cells in a table created in Pages?
    Note- I am trying to figure out how to create and format tables in the latest version of the Pages app on an iPad air (iOS 8.1.1.1) . Creating tables, adding or removing borders for individual/all cells in a table seems straight forward. However the default border style seems to be a heavy black line. How do I change this?
    I found the option add or remove borders for all/ individual cells in a table, however I can't find any option within style/format dialogue screens for changing colour or line thickness for table cells. Likewise I can't find any clear instructions on how to do this in apple help pages or support website
    Btw- I'm assuming  it is possible to customize/adjust the colour & thickness of selected lines in a table created in this app (it's fairly easy to do this word processing apps like MS Word) please let me  know if this is not actually possible in Pages

    They know perfectly well what they took out of Pages '09.
    Well over 90 features.
    Do you think you posting feedback is going to remind them of what they did?
    http://www.freeforum101.com/iworktipsntrick/viewforum.php?f=22&sid=3527487677f0c 6fa05b6297cd00f8eb9&mforum=iworktipsntrick
    Pages '09 should still be in your Applications/iWork folder.
    Archive/trash Pages 5 and rate/review it in the App Store, then get back to work.
    Peter

  • How to set a fixed width for a box

    Hi there,
    Struggling here.... must admit. 
    I need a solution whereby I can set a fixed width for a box that is grouping two buttons.  I suppose generally, I want to know how to set a fixed width for anything element.
    See the picture below.  I want the two buttons to stay the same distance apart, and I want the grouped buttons to stay the same distance from the right edge of the window, even as a user resizes the window.
    This is what happens when you reduce the size of the window .....
    I would like to stop this from happening.
    I can't figure out how accomplish keeping the parent div a fixed width, and a fixed position from the right side of the window, so the buttons won't overlap.
    Perhaps I'm doing the whole thing wrong. 
    I mean, is there a way to accomplish this without grouping the buttons?  That is, make the buttons fixed width, fixed distance apart from each other, and fixed distance from the right side of the window, even as the user resizes the page?
    I am trying to accomplish this using the Min/Max width settings, but given that there are so many different units to choose from, and the fact that when I place a button or box on the screen, it seems to be creating that button or box with a percentage-based width, I don't know how many pixels to set it to.... sigh....
    Many thanks in advance for your help.
    Sam

    Okay after much futzing I figured out at least part of the solution I need, but if someone knows of a more efficent way to do this please let me know. 
    I set a fixed minimum width in pixels for both of the buttons at 156px.
    I then made the left button float left and the right button float right.
    I then made the parent div for the buttons float right.
    That made the buttons stay the same size.
    The only thing I need to figure out how to do now is make the parent div stay a consistent distance in pixels from the right.  I tried setting a right margin but that didn't work.  As you size the window down, the div gets closer to the edge, until it passes it.  

  • How to set a minimum width and height for a stage or scene?

    Hello,
    Does anyone how to set a minimum width and height for a stage or scene?
    I tried listening for width/height property value changes and then adjust the width/height if necessary, but that causes unpleasant flickering of the window.
    In JavaFX 2.1 beta SDK for Mac OS, the Stage class has setMinWidth() and setMinHeight() functions which work very well.
    I'm wondering what's the equivalent way to do that when using the FX SDK for Windows.
    Any help is appreciated!
    Thanks.

    I was wondering how to enforce a minimum stage size with JavaFX 2.0.3.The same flickering way you are currently doing it. See: http://javafx-jira.kenai.com/browse/RT-15200 "Need a way to set the minimum size of a window"

  • HT4623 How can u set up your iphone when all the files are deleted?

    How can I set up my iphone if all the files are deleted?

    What files are deleted?
    Please explain

  • I don't know how to set up closingFirefox to have all open tabs next time when I open it, without calling RESTORE PREVIOUS SESSION

    Question
    I don't know how to set up closingFirefox to have all open tabs next time when I open it, without calling RESTORE PREVIOUS SESSION

    Tools > Options > General
    :At the top '''When Firefox starts:''' Show my windows and tabs from last time
    You can still bring up your home page later.

  • How do i copy album artwork to all the songs in an album

    How do i copy album artwork to all the songs in an album as some of the songs do not have the artwork, as with the previous version of itunes you had to load artwork individually.
    I have tried the copy and paste option and that does not work
    Look forward to hearing from you

    "How do i copy album artwork to all the songs in an album as some of the songs do not have the artwork, as with the previous version of itunes you had to load artwork individually."
    That suggests some underlying issue, as iTunes has always (AFAIR) allowed artwork to be assigned with multiple tracks in a single action.  For an album, right-click on the album, select Get Info, select the Artwork tab.  You then have three options:
    If the artwork image exists as a file, click the Get Artwork button, browse to and select the file, then click Open.
    Drag and drop the image file from Windows Explorer to the Artwork tab (previous releases also allowed drag and drop from a web browser, this functionality is missing - either by design or as the result of a bug - in iTunes 12).
    If you've copied the artwork image to the clipboard, press Ctrl-V on the keyboard to paste in the image (prior to the 1st release of iTunes 12 this could also be done using right-click > Paste - hopefully this will be restored as a bug-fix in the next update)
    "I have tried the copy and paste option and that does not work."
    There are three possible causes for this:
    The format of your media files doesn't support embedded artwork - specifically, uncompressed audio in WAV format.  You'll need to convert to Apple Lossless (without loss of quality) or either MP3 or AAC (if you're OK with lossy media) before artwork images can be associated with your media.
    Windows' permissions are preventing your media files from being updated when iTunes attempts to embed the images (in a perfect world iTunes should report this as an error, but it actually does nothing).  To check this, find the folder that contains media of interest in Windows Explorer (by default this will be C:\Users\user_name\Music\iTunes\iTunes Media\Music\artist_name\album_name), right-click and select Properties, Security tab - check that your Windows user account has full control over the folder.
    The media files that you're trying to add artwork to may be set to read-only in Windows. Select the folder as before in Windows Explorer, right-click > Properties and make sure that the Read-only flag is cleared.

  • Move specific folder of all the mailbox to Archive

    Hi,
    I am doing IMAP migration for an organisation from Google Apps to Office 365(Enterprise E3 plan). After the completion of migration, I could see "All Mails" label/folder in the Office 365 mailbox. "All Mails" folder has duplicate mails
    of Inbox, Sent items & Archived mails. It's very difficult to delete duplicated mails in thousand of mails in "All Mails" folder. As a result I want archive the "All Mails" folder of all the mailbox in Office 365. 
    I have enabled Archive for all the mailbox but in result the default retention policy has been applied and the older mails have been moved archive. 
    Kindly let me know,
    1. How could I restore the archived mails to the previous folders of all the mailbox as an admin?
    2. How could I enable Archive retention policy for specific folder of all the mailbox as an admin? or How could I move "All Mails" folder of all mailbox to Online archive as an admin?
    Awaiting for proper response..
    Thanks in Advance...

    Ah, exactly my question.
    I used IconComposer in the Developer tools to create a custom folder icon but now i can't find any way to get it onto the folder.
    Folder icons are simply a file within the folder which has the name 'Icon ' and is set to be invisible. The final character in the filename is a 'Return' +(ASCII 13)+ and i can't find a way to get it into a filename.
    For Tiger i had a contextual menu which would copy an icon from one file/folder to another, but it doesn't handle the new huge Leopard icons properly.

  • SharePoint 2013 - Document Set Capture Version History. Does each version captured for each document set keep a copy of all the document stored in the document set?

    Hi All,
    We have currently encountered an issue where even though version control is turned on in a document library, changes made to the metadata of a document set is not tracked in a version history. 
    We have found that in order to this a user will need to manually click on the capture version history button. 
    With this in mind, we are concerned about the impact of this on our storage. The question we have been trying to answer is whether each document set version:
    stores the change in metadata of the document set and a copy of all the documents stored in the document set
    stores the change in metadata of the document set and a reference to the documents stored in the document set (making use of SharePoint 2013's shredded storage)
    The reason we ask this is that if a document set version stores a copy of all the document stored in a document set, a change in one of the fields in the document set could result in the storage used to grow exponentially. e.g. if the document set contains
    documents totaling 30MB, and if we have 10 versions of the document set, we could take up 300 MB in the content database for just one document set.
    We have tried to some searching around Google but wasn't able to find any answers around this question. Would appreciate some assistance from anyone who has knowledge around how document set version history works. 
    Thanks in advance.
    John

    i had a long thing written out, but submit failed.  suffice to say it does "2".  it only stores the changes with pointers to the documents. 
    Christopher Webb | Microsoft Certified Master: SharePoint 2010 | Microsoft Certified Solutions Master: SharePoint Charter | Microsoft Certified Trainer| http://tealsk12.org Volunteer Teacher | http://christophermichaelwebb.com

  • Different iOS: phone 4 & Iphone 6 Plus how to share same music folder but all the rest of the phone information separated not merge

    I have a iphone 4 (iSO7.1.2) & a iphone 6 plus (iSO 8.1) . 1. Can I use one Apple ID for 2 phones? 2. I want to share only same music but have different Contacts, Emails boxes, Apps, documents etc on each phones. How to make it possible? 3. What should I do the iCloud back-up is lapse. The email address is to the same location. How do i set 2 different iCloud back-up individually on each phone? I'm using Mac OS X. Appreciate, all help. Thank you ... both my iphones are pretty messy up now .....identity crises....one moment its saving back-up or sync to iSO 7.1.2 ... the next moment its iSO 8.1.....

    iphone 4 & Iphone 6 Plus how to share same music folder but all the rest of the phone information separated not merge?
    You already ask this question, why are you asking again.

  • How do i get a list of all the apps i have purchased this year

    how do i get a list of all the apps  have purchased this year and how much each app was

    Check your iTunes purchase history (click your email address in the upper right corner in the iTunes App Store-> log in -> click Purchase History).  This gives you a comprehensive list of apps you've purchased.
     Cheers, Tom

Maybe you are looking for

  • Error Message Repeated Display When using BBP_DOC_CHECK_BADI

    Hi,EveryOne,     Who can help me,I am using BBP_DOC_CHECK_BADI,Check the item's,when the first time,i modify some PO item data,then through this BBP_DOC_CHECK_BADI,can show one error message.Then i modify the error data to correct,push the check butt

  • Still trying to get help with Acrobat Reader - not printing

    I have tried printing from Acrobat Reader 10.1 both as regular printout and also printing as image and neither way is working. Any assistance would be greatly appreciated. Here's are the log files: As PDF: Process:         AdobeReader [3790] Path:   

  • DTP plugin can't connect to 10g DB that uses SERVICE_NAME instead of SID

    Hi, I am trying to set up a connection to a database that uses a service name instead of a SID (see below for the TNSNAMES entry. It gets an ORA-12505 error because the listener does not know of SID given in connect descriptor. The Connection descrip

  • What are the best iPhone 5 cases that are slim? I don't want to add bulk to my phone.

    Looking for suggestions for slim cases - something that protects but doesn't add bulk.  I have a new black iPhone5 and need some guidance. Thanks in advance!

  • Help on summing data

    I have below two tables:          Table A           col1 col2           1     10           1     10           1     10           Table b           Col1 col2           1    20           Desired output:           a.col1 sum(a.col2),sum(b.col2)