Set the default appearance of a custom component (setStyle overrides the CSS definition)

Hello everyone, I have some problems using the spark skinning mechanism, I hope you can help me.

In Flash Builder, I have a Flex library project that contains a few written in AS SkinnableComponents (as suggested by http://help.adobe.com/en_US/flex/using/WS460ee381960520ad-2811830c121e9107ecb-7feb.html).

For each of these components, I wrote a default skin that I put the component in its constructor (setStyle("skinClass","MyComponentDefaultSkin)).

But this, my users will not be able to define their appearance customized using CSS.

My question is, How to set a default skin to its component without disabling definition of appearance in CSS? I know that this is possible since the spark (such as button) components provide a default skin, but I can always change it in a CSS file.

Your help would be greatly appreciated.

See you soon

I found and explain how to set the default appearance of the custom effectively here component: http://forums.adobe.com/message/4220491#4220491

Tags: Flex

Similar Questions

  • Setting the column definitions in a file.

    I set the columns to display for a file of music; That is, size, type, album, artist, etc.. How can I cause this definition of the column remains constant for the record that I've changed, and how to cause Windows 7 to apply the definition to all the music files?

    Once you get a folder as you wish with the detail columns,

    Click on organize upper-left.

    Click on the folder and search options,

    Go to the display section

    Go ahead and uncheck the box at the top of the page, always display icons and never thumbnails, (a common framework)

    Then at the top click on apply to records.

    Then click apply and then click OK on the bottom,

  • Help the evolution of the CSS based on the resolution of the monitor

    Hello!

    So I thought it would be cool to have some sort of javascript that would change the CSS based on what users monitor resolution was.  I undertook research on google and found this:

    http://www.Warriorforum.com/website-design/10031-script-load-different-CSS-depending-scree n - resolution.html

    Change what I needed to I came up with this code:

    < script type = "text/javascript" >

    function getcss (cssfile) {}
    loadcss = document.createElement ('link')
    loadcss.setAttribute ("rel", "stylesheet")
    loadcss.setAttribute ("type", "text/css")
    loadcss.setAttribute ("href", cssfile)
    document.getElementsByTagName ("head") [0] .appendChild (loadcss)
    }

    If (screen.width < = "800")
    Sets the range of resolution you target (less than 800 pixels wide in this case)

    {
    getCss('css/800m.css')
    Sets the .css file that you want to load for this range (css/800.css)
    }

    ElseIf (screen.width > '1024' & & screen.width < '1152')
    This time, we are targeting all resolutions between 1024 and 1152 pixels wide

    {
    getCss('css/1024m.css')
    And we want to load the .css file named ' css/1024.css.
    }

    ElseIf (screen.width > '1280' & & screen.width < '1360')
    This time, we are targeting all resolutions between 1360 and 1280 pixels wide

    {
    getCss('css/1280m.css')
    And we want to load the .css file named ' css/1280.css.
    }

    ElseIf (screen.width > '1440' & & screen.width < '1600')
    This time, we are targeting all resolutions between 1440 and 1600 pixels wide

    {
    getCss('css/1440m.css')
    And we want to load the .css file named ' css/1440.css.
    }

    on the other

    {
    getCss('css/1680m.css')
    This else a condition 'if' statement If any of the following criteria are met, load css/1680m.css
    }

    < /script >


    So far, the following resolutions work:

    800 x 600

    1360 x 768

    1440 x 900

    But the resolutions

    1024 x 768

    1152 x 648

    1152 x 864

    1280 x 720
    1280 x 768
    1280 x 800
    1280 x 900

    Do not.  They all have a site that is too big.  My CSS for these resolutions (1024 and 1280) are very good and have no problems.  So I think that something is wrong with my JS.  I'm not a JS expert so I hope that I do not something to spoil.

    Any help would be appreciated.

    Thank you

    If I go with the button select a how can I do it on multiple pages?

    Use of cookies.

    http://www.dynamicdrive.com/dynamicindex9/stylesheetswitcher.htm

    Nancy O.
    ALT-Web Design & Publishing
    Web | Graphics | Print | Media specialists
    http://ALT-Web.com/
    http://Twitter.com/ALTWEB
    http://ALT-Web.blogspot.com

  • When you create a PDF from a scanner, is there a way to set the default value for the size of 8.5 x 11 letter custom every time I make a PDF from a scanner?

    When you create a PDF from a scanner, is there a way to set the default value for the size of 8.5 x 11 letter custom every time I make a PDF from a scanner?

    Hi kevin7frg,

    You can go to "file > create > scanner > configure presets PDF»

    The dialog box that appears, you can choose 8.5 X 11 as the default width and height of PDF pages to scan.

    Hope that helps.

    Kind regards

    Ana Maria

  • Using laptop with an additional monitor above. To set the default appearance as Monitor 2 above 1 monitor

    I can set up my laptop with an additional monitor as extended desktop.  By going to the followed control panel display I can manually fix the default setting for the two monitors side by side, to have one on the other.

    However, every morning when I do my laptop in to work and reconnect to the extra monitor I have to redo it.  Is there a way to set the default display settings so that it affects automatically two monitors as one above the other?

    Using Windows XP Pro.  Help appreciated.

    Hi Andrew_Wright,

    Windows XP does not record the settings once you unplug the extra monitor.

    You can use some third party such as the software provided with the video driver software.

    Use your favorite search engine to find all these software for you help.

    Important: Using third-party software, including hardware drivers can cause serious problems that may prevent your computer from starting properly. Microsoft cannot guarantee that problems resulting from the use of third-party software can be solved. Software using third party is at your own risk.

  • How to set the default value of the component selectOneChoice in the table to the ADF

    Hi all

    I use jdev 11.1.1.6.0 version.

    I used an adf table in which an attribute is selectOnceChoice.

    To create the table and selectOneChoice I used the data control java bean.

    and drag and drop a table and after that I have drag and drop one of the attributes as selectonechoice and linked with the return of the method list as < key, value > pair.

    I want the default value to select only one option in each attribute rows.

    I checked with simillar issue on post next, but not yet resolved.

    
    
    
    
    

    My jspx code is

    
    <af:column id="c11"
                                             headerText="Invoice To" >
                                        <af:outputText value="#{row.invoiceTo}" id="ot19"/>
    <af:selectOneChoice value="#{bindings.invoiceTo.inputValue}"
                                                        label="#{bindings.invoiceTo.label}"
                                                        required="#{bindings.invoiceTo.hints.mandatory}"
                                                        shortDesc="#{bindings.invoiceTo.hints.tooltip}"
                                                        id="soc3"
                                                        autoSubmit="true"
                                                        valuePassThru="true">
                                      <f:selectItems value="#{bindings.invoiceTo.items}"
                                                     id="si4"/>
                                    </af:selectOneChoice>
    </af:column>
    
    
    

    where invoiceTo is the table attribute and the invoiceTo attribute is dragged and dropped as a SOC function list Source data mapped data value with the List attribute

    and the display attribute

    Data value = invoiceTo List = lovMasterKey attribute

    Display attribute = lovMasterValue

    that list is maintained at < lovMasterKey, lovMasterValue >

    According to the value of invoiceTo line, it should show as default value is selectOneChoice, but its showing no not as a default value.

    Please, help me how set the default value of selectOneChoice in the table according to each value line invoiceTo.

    Thank you all for the help on this issue.

    Problem has been resolved.

    Reason for this was used

    It is solved using code used for the list built for selectoneChoice more

      List lovMasterList = new ArrayList();
    
    SelectItem siItem = new SelectItem();                      
    
    siItem.setLabel(objAfCmnLovMasterListVO1.getLovMasterValue());
    
    siItem.setValue(objAfCmnLovMasterListVO1.getLovMasterKey());
    
      lovMasterList.add(siItem);
    

    Now, I used the code where the line below. InvoiceTo is the key and row.invoiceToItems are the list of articles for selectOneChoice.

    
    
    
      
    
    

    Thank you very much...

  • How to manage the focus in the custom component

    Hallo. As you know some flex components have indigenous focus, like buttons, textinput, etc... I created a custom component which is a borderContainer... As you know, by default, if the user press TAB my BorderContainer will never receive the focus... I tryied to set a property as setFocus() and tabFobusEnabled to true, but I still have some problems with my borderContainer development... It's as if my app knows that my custom component is not a native component... Is there a way for my component to receive focus without problems?... Which is the best way to do this?

    Thx a lot

    Max

    Components must implement IFocusManagerComponent in order to receive the focus.

  • Helps the creation of a custom component.

    Hello. I created a very simple custom component called myComp. It's a simple canvas 100 pixels x 100 Basic with a component of Image control.
    < mx:Canvas >
    < mx:Image id = "image1" >
    < / mx:Canvas >

    After the instantiation of the component in Main.mxml for example. var pic1:myComp = new myComp(); I'm having a problem setting the source property of the Image element.

    "image1" is the id of the mx:Image in the custom compoenent, then I tried pic1.image1.source = ' assets/ball.jpg' but I get a runtime error ' Error #1009: cannot access a property or method of a null object reference.

    Don't really know what I'm doing wrong.

    Any help please!


    In your custom component, try adding a public var bindable that contains the path to your image. In addition, the value the image.source this var.
    In your main application, set the var within the tags in the custom component. Since this is a public var, it will appear in the indication of the code. You can also now change the var of the image of the main application whenever you like using ActionScript code.

  • I want to set the default url of all new additional tabs I have open - how please?

    When I'm already browing and I choose to open a new tab opens on the Yahoo search engine, and I don't see how to change this. I want to open with google.co.uk. The first page is the default in Firefox and it works very well - it's just the extra legs that are the problem.

    Start Firefox in Safe Mode to check if one of the extensions (Firefox/tools > Modules > Extensions) or if hardware acceleration is the cause of the problem.

    • Put yourself in the DEFAULT theme: Firefox/tools > Modules > appearance
    • Do NOT click on the reset button on the startup window Mode safe

    You can watch the pref browser.newtab.url the topic: config page and set this pref to the URL of your preferred the new tab page.
    You can use these special pages or set the pref to the URL of your preferred the new tab page.

    • the new default tab with the tiles page is on: newtab
    • the default homepage is Subject: Home
    • to a blank page, you can use Subject: vacuum

    The pref browser.newtabpage.enabled must be set to true to use the page defined through browser.newtab.url like the new tab page.

    You can open the topic: config page via the address bar.
    You can accept the warning and click on "I'll be careful" to continue.

  • How to set the default zoom according to the screen in Linux level?

    Starting from the same account, I can use different types of screens: low and high DPI. I would like to have the font size (and more generally, the zoom level) right of each screen.

    To set the default zoom level, you can set the layout.css.devPixelsPerPx, but we can't define it it fixed-value, which is not OK, because I would like that the value depends on the environment (as for the font size in the menu which is always OK, because it depends on the resource Xft.dpi X 11).

    Note: I have several profiles, while it is not even possible to write a wrapper that could modify the prefs.js file, because I don't know in advance which file would I need to change.

    What can I do?

    One possibility would be to use the mozilla.cfg file in the Firefox program folder.
    This file can contain JavaScript that runs with full chrome privileges and it it not difficult game of the pref layout.css.devPixelsPerPx to a correct value for the screen currently attached.
    You will need to know how to calculate the dimensions of the screen.

  • How to set the default value for the digital control on front panel?

    How to set a default value for a numeric control of LabVIEW 2009 Front Panel? I have several input values that are actually configuration settings I want to settle with the default values of zero. I want them to be the values displayed when the façade first appears until the code is executed.

    I really want to use the Minimum and Maximum limits by default for this because I still want to be able to define acceptable limits for values.

    I would not be able to specify a default value of zero for these entries?

    Enter the desired value, then "right click...... of default data of value to operations. Save the VI.

  • How to set a default value for the bar to EXPLORE in Office XP Explorer?

    When I explore my PC Explorer bar to the default left hand blue component with what is called frequent tasks. I ALWAYS click on the folder icon (or view > bar explore > files).

    I would like to open like that by default - is a registry setting or remove this?

    Thank you
    Neal

    1st post!

    Hey Neal.uj,

    Welcome to the forum!

    You can set the default action on a folder to explore instead of to achieve this effect. To do this:

    ·         Click Start

    ·         Click on Control Panel

    ·         Open Folder Options

    ·         Click the File Types tab

    ·         Click the folder

    ·         Click on Advanced

    ·         Click on Explorer

    ·         Click set as default

    ·         Click OK

    ·         Repeat the same process for file

    ·         When you're done, click close

    Hope that helps, I look forward to hearing from you.

    Steven
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think

  • How can I set a default save file for scans using the Solution Center?

    Using Windows 7-64 bit.   All-in-one printer HP Photosmart C-309 Premuim has.

    Due to a crash of Windows, I had to install a new drive and reload Windows. I also rebooted other software like the HP Solution Center & drivers. My problem is that I can't find how to set a default folder for my scans.  This is NOT mentioned in the user manual, but it has been initially implemented by the HP Technical Support when the printer was new.  Can anyone relate how to set the default folders for my scans?

    Thank you.

    Tango

    When you go to the analysis, there should be a window that appears to select the format and the DPI of the analysis. There is also an option for the options of '/CSA/ '. Here you can change the default location to save on selecting another file of having sent them to analysis.

    I would like to know if this information helps, and have a great day!

  • All-in-one HP Deskjet 2540: How do I set the default to print in black and white only

    The manual says this, but it applies to a PC and I have a Mac:

    "If you want to print a black and white document using a black ink only, click on the Advanced button. Printing from the drop in grayscale, select black ink only, and then click OK. »

    Someone knows how to set the printer to print only black & white for a Mac?

    As an accompaniment, there are security settings that must be configured to reduce the risk of access remotely for the printing device?

    Thank you

    Hello
    Follow the steps below to print using black ink only:

    1. from the application used to print, click the file menu and select print.  The print window is displayed.
    NOTE: The print window might be minimized: click Show details to display all available parameters.

    2. to access the color options, click in the area of selection below, listed as the name of the program (e.g. TextEdit)
    Will appear as Copies & Pages within Microsoft Office applications.

    3. Select Type/quality paper in the menu dropdown.

    4. click the triangle next to color Options of spending parameters.

    5. set the color to grayscale field.

    6. set the Mode to grayscale in black cartridge only.

    You can save the settings for later use by clicking preset > save current settings as preset... Once you print using the saved preset will remain by default up to what we will choose another preset.

  • How to set the default boot drive? I can get to about 8 choices but only one is correct and I don't know how to do that by default.

    I hit F10 and get a choice. The default value is a flash drive with no boot of the stuff.  How do I pick up and save the right choice that the computer always looking to when it is turned on.

    Hi Herbertrosenthal,

    Welcome to the Microsoft community where you can find the answers related to windows.

    If you get multiple entries start during the connection to the Windows 7 operating system then I suggest you to refer to the following methods.

    This problem can occur because interties incorrect startup, that I suggest to read the following steps and check if it helps.

    a. log in the computer using an account with administrator rights.

    b. Click Start, type msconfig.exe in the start search box and press ENTER to start the System Configuration utility.

    c. Select the Startup tab. in the list of boot tab, select the one you want to set a default value.

    d. click on apply, OK and then click on restart and check if it helps.

    Note: If you want to change the boot drive settings then I suggest you to read the following steps:

    a. new computers often display a startup (or boot) menu. In the start menu, choose "Configuration of the BIOS," or "BIOS settings," or something similar.

    Procedures vary depending on the manufacturer of the BIOS. Usually, you must press a key (for example, F2, F12, DELETE, ESC) or a key combination whenever you turn on your computer but before Windows starts. If the Windows logo appears, you must try again by waiting until the Windows logon prompt appears, and then stop and restart your computer again.

    b. the BIOS configuration screen appears. On the BIOS Setup screen, choose the option called "Boot order" or something similar. Startup command parameters may also be listed under "Advanced settings" or something similar.

    c. Select your drive from DVD or USB drive as first boot device. (The USB flash drive can be listed under "Removable devices" or other similar term).

    d. save the setting changes, and then exit the BIOS.

    Note: BIOS change / semiconductor (CMOS) to complementary metal oxide settings can cause serious problems that may prevent your computer from starting properly. Microsoft cannot guarantee that problems resulting from the configuration of the BIOS/CMOS settings can be solved. Changes to settings are at your own risk.

    If you need Windows guru, do not hesitate to post your questions and we will be happy to help you.

Maybe you are looking for