default skin for the button class spark

Hi, where in the button spark or superclasses class specifies its default appearance?

The Spark as Button.as components do not define their default skin internally. If you want to have a skin by default so that you don't have to manually specify the skin whenever you have two options: skinnable component. One that is used in the flex sdk, and the preferred method is to use a css file to specify the skin for the component. If you do not want to, then the other option is to call setStyle ("skinClass", YourSkinClass) within the constructor of the actionscript component.

Tags: Flex

Similar Questions

  • Default directory for the button browse for File Upload

    Hello.

    I use Apex 3.1.2. Is there a way to set a "default" directory on the browse file upload button? I would like to have users click the upload file button and this default directory appear rather than forcing them to weed through multiple levels of directories.

    Thank you.


    Elijah

    Hi Elijah,

    The simple answer is no, there is no way to do so as the control over the content and the functionality of the field FileBrowse is now restricted for security reasons.

    Andy

  • Definition of default values for the inputs of button and the cursor?

    Hello

    I use Labview 8.5.1 and have a few entries button and zipper-type on my front. How can I set some of them having specific (as opposed to zero) default values when the VI is executed?

    Thanks for the help

    The default value for the type of slide of entry (or button).

    Right-click on the control.

    Select "Operations on the data" > "default to the current value of doing."

  • How can I dsiable the skin for a button?

    I want to make a button without the skins.  I know how to specify skins for a button, but I do not see how to configure them to null.

    You can get rid of all the style by setting:

    skin: ClassReference(null);
    
    
    
  • ToolTip for the button

    Nice day

    I'm new to the blackberry development. I created a bitmapbuttonfield using the examples of the advanced user interface. There is a button with an image. I want to display a ToolTip for the button when the button receives the focus. Can someone please help

    Thanks in advance

    Hello

    Use this code:

    package mypackage;
    
    import net.rim.device.api.ui.Field;
    import net.rim.device.api.ui.FieldChangeListener;
    import net.rim.device.api.ui.component.ButtonField;
    import net.rim.device.api.ui.component.Dialog;
    
    public final class MyScreen extends TooltipScreen
    {
    
        ButtonField btn1,btn2,btn3;
        public MyScreen() {
    
            btn1=new ButtonField();
            btn1.setChangeListener(new FieldChangeListener() {
                public void fieldChanged(Field field, int context) {
                    Dialog.alert("Button 1 Click");
                }
            });
            btn2=new ButtonField();
            btn2.setChangeListener(new FieldChangeListener() {
                public void fieldChanged(Field field, int context) {
                    Dialog.alert("Button 2 Click");
                }
            });
    
            btn3=new ButtonField();
            btn3.setChangeListener(new FieldChangeListener() {
                public void fieldChanged(Field field, int context) {
                    Dialog.alert("Button 3 Click");
                }
            });
            add(btn1, "Button 1");
            add(btn2, "Button 2");
            add(btn3, "Button 3");
    
        }
    
    }
    
    package mypackage;
    
    import java.util.Timer;
    import java.util.TimerTask;
    import java.util.Vector;
    
    import net.rim.device.api.ui.Field;
    import net.rim.device.api.ui.Graphics;
    import net.rim.device.api.ui.XYRect;
    import net.rim.device.api.ui.container.MainScreen;
    
    public class TooltipScreen extends MainScreen {
    
        TooltipScreen screen = this;
        boolean doRedraw = false;//prevent infinte redrawing
        Vector tooltips = new Vector();//vector to hold tooltip strings
        private Timer tooltipTimer = new Timer();
        private TimerTask tooltipTask;
        boolean alive = false;//is the tooltip alive? used to pop it after our timeout
        int count = 0;//used to calculate time tooltip is displayed
        //tooltip popup colours:
        int backgroundColour = 0xeeeeee;
        int borderColour = 0xaaaaaa;
        int fontColour = 0x666666;
        //the tooltip:
        String tooltip;
        int tooltipWidth;
        int yCoord;
        int xCoord;
        //region parameters:
        XYRect contentArea;
        int contentBottom;
        int contentRight;
    
        public TooltipScreen() {
            super();
    
            //when timeout reaches 100ms*20 ie. 2seconds set alive to false and redraw screen:
            tooltipTask = new TimerTask() {
    
                public void run() {
                    if (alive) {
                        count++;
                        if (count == 20) {
                            alive = false;
                            invalidate();
                        }
                    }
                }
            };
    
            tooltipTimer.scheduleAtFixedRate(tooltipTask, 100, 100);
    
        }
    
        //override add method adds an empty string to tooltip vector:
        public void add(Field field) {
            tooltips.addElement("");
            super.add(field);
        }
    
        //custom add method for fields with tooltip: add(myField, "myTooltip");
        public void add(Field field, String tooltip) {
            super.add(field);
            tooltips.addElement(tooltip);
        }
    
        public void setColours(int backgroundColour, int borderColour, int fontColour) {
            this.backgroundColour = backgroundColour;
            this.borderColour = borderColour;
            this.fontColour = fontColour;
        }
    
        //reset everything when user changes focus,
        //possibly needs logic to check field has actually changed (for listfields, objectchoicefields etc etc)
        protected boolean navigationMovement(int dx, int dy, int status, int time) {
            count = 0;
            alive = true;
            doRedraw = true;
            return super.navigationMovement(dx, dy, status, time);
        }
    
        protected void paint(Graphics graphics) {
            super.paint(graphics);
            if (alive) {
                Field focusField = getFieldWithFocus();
                tooltip = (String) tooltips.elementAt(screen.getFieldWithFocusIndex());
    
                //don't do anything outside the norm unless this field has a tooltip:
                if (!tooltip.equals("")) {
                    //get the field content region, this may fall inside the field actual region/coordinates:
                    contentArea = focusField.getContentRect();
                    contentBottom = contentArea.y + contentArea.height;
                    contentRight = contentArea.x + contentArea.width;
    
                    //+4 to accomodate 2 pixel padding on either side:
                    tooltipWidth = graphics.getFont().getAdvance(tooltip) + 4;
    
                    yCoord = contentBottom - focusField.getManager().getVerticalScroll();
                    //check the tooltip is being drawn fully inside the screen height:
                    if (yCoord > (getHeight() - 30)) {
                        yCoord = getHeight() - 30;
                    }
    
                    //check the tooltip doesn't get drawn off the right side of the screen:
                    if (contentRight + tooltipWidth < getWidth()) {
                        xCoord = contentRight;
                    } else {
                        xCoord = getWidth() - tooltipWidth;
                    }
    
                    //draw the tooltip
                    graphics.setColor(backgroundColour);
                    graphics.fillRect(xCoord, yCoord, tooltipWidth, 30);
                    graphics.setColor(borderColour);
                    graphics.drawRect(xCoord, yCoord, tooltipWidth, 30);
                    graphics.setColor(fontColour);
                    graphics.drawText(tooltip, xCoord + 2, yCoord);
                }
            }
            //doRedraw logic prevents infinite loop
            if (doRedraw) {
                //System.out.println("redrawing screen: " + System.currentTimeMillis());
                screen.invalidate();
                doRedraw = false;
            }
        }
    }
    
    package mypackage;
    
    import net.rim.device.api.ui.Font;
    import net.rim.device.api.ui.Graphics;
    import net.rim.device.api.ui.Manager;
    import net.rim.device.api.ui.UiApplication;
    import net.rim.device.api.ui.component.LabelField;
    import net.rim.device.api.ui.container.PopupScreen;
    import net.rim.device.api.ui.container.VerticalFieldManager;
    
    class MyTooltip extends PopupScreen{
        int _x;
        int _y;
        TooltipThread _tooltipThread;
    
        private MyTooltip(Manager manager) {
            super(manager);
         }
        public void sublayout(int width, int height)    {
            super.sublayout(width,height);
            setPosition(_x,_y);
            System.out.println("Tooltip x: " + Integer.toString(_x) + ", y: " + Integer.toString(_y));
        }
        protected void applyTheme() {
            // Overriden to suppress Border etc.
        }
        public void removeToolTip() {
            if ( _tooltipThread != null ) {
                _tooltipThread.dismiss();
            }
        }
        private void display(UiApplication uiApp, int x, int y, int displayTime) {
            _x = x;
            _y = y;
            _tooltipThread = new TooltipThread(uiApp, this, displayTime);
            _tooltipThread.start();
        }
    
        public static MyTooltip addToolTip(UiApplication uiApp, String toolTipString, int x, int y, int displayTime) {
            VerticalFieldManager manager = new VerticalFieldManager(Manager.FIELD_VCENTER|Manager.NON_FOCUSABLE) {
                protected void paint(Graphics graphics) {
                    graphics.setColor(0x00FFFFFF); // White
                    graphics.fillRect(0,0,getWidth(),getHeight());
                    graphics.setColor(0x00000000); // Black
                    graphics.drawRect(0,0,getWidth(),getHeight());
                    super.paint(graphics);
                }
            };
            MyTooltip toolTip = new MyTooltip(manager);
            LabelField label = new LabelField(' ' + toolTipString + ' ', LabelField.NON_FOCUSABLE);
            label.setFont(Font.getDefault().derive(Font.PLAIN, 16));
            toolTip.add(label);
            toolTip.display(uiApp, x, y, displayTime);
            return toolTip;
        }
    
        class TooltipThread extends Thread {
    
            Object _notifyObject = new Object(); // Used to allow user to dismiss this Tooltip
            PopupScreen _tooltip; // Screen we are going to display
            UiApplication _ourApplication; // access to pushGlobalScreen and dismissStatus from our Application
            int _displayTime; // in seconds
    
            public TooltipThread(UiApplication ourApplication, PopupScreen tooltip, int displayTime) {
                _tooltip = tooltip;
                _ourApplication = ourApplication;
                _displayTime = displayTime;
            }
    
            public void run() {
                _ourApplication.pushGlobalScreen(_tooltip, 999, false);
                synchronized(_notifyObject) {
                    try {
                        _notifyObject.wait(_displayTime * 1000);
                    } catch (Exception e) {
                    }
                };
                _ourApplication.dismissStatus(_tooltip);
            }
    
            public void dismiss() {
                // notify the waiting object to stop the Thread waiting
                synchronized(_notifyObject) {
                    _notifyObject.notify();
                }
            }
    
        }
    
    }
    
  • Default properties for the text field of the PDF forms

    How can I set the default properties for the text field?  The creator of forms set of font sizes that are too large.

    Right-click on the field > use current properties as new default.

    It will keep the new settings until the next time that you do this. It is not specific to the document. Do it separately for each field type (text, button, etc.)

    On an existing form, you can select multiple fields. A pro tip, is that you don't have to close the properties to move from the field to the field to the field. Dungeon opens and work faster.

  • Override the default behavior of the button Delete of list manager

    Hello

    Everyone please help. I'm trying to override the default behavior of the button Delete of list manager. The first thing, I want to restrict users to select only one option from the list to delete; meaning don't allow multiple options for users to remember. Before removing the selected option in the list; I want to perform a Javascript/AJAX validation on the database to check if the user has permissions to remove the option from the list. If the user has privileges simple delete option selected in the list. If the user does not have privileges and then draw the attention of the user with a message "not authorized...!  and this should occur when the user selects the option in the list to the list manager, and then click Remove from the list manager.

    Remove list manager of the shutter release button of the function 'deleteListElement ($x ('P3_LM_USES'))' on the onclick event. P3_LM_USES is my element of list manager in a form.

    I use the version of Oracle APEX 4.0.2 and Oracle 11 g R2 database.

    I was able to substitute the Add button functionality using the JS function below list manager and perform validation on database by using the method of ajax on request.

    {code}

    < script type = "text/javascript" >

    <!--

    This replaces the default manager of Apex lists which removes embedded spaces from the last item when it is added to the text box

    appendToList function (value, toList)

    {

    First of all, get rid of all spaces

    trimmedValue = value;

    var ajaxRequest = new htmldb_Get (null, & APP_ID, 'APPLICATION_PROCESS = VALIDATE_ADD_USE', 0);

    ajaxRequest.addParam('x01',trimmedValue);

    var ajaxResult = ajaxRequest.get ();

    Alert (ajaxResult);

    If (ajaxResult == 1)

    {

    Alert ('after alert ajaxResult');

    Then, divide the string separated by commas in a table

    valueArray = trimmedValue.split(",");

    for (i = 0; i < valueArray.length; i ++)

    {

    If (valueArray [i]! = ' ')

    {

    found = false;

    for (j = 0; j < toList.length; j ++)

    {

    If (toList.options [j] .value is [i] valueArray)

    found = true;

    }

    If (found == false)

    toList.options [toList.length] = new Option ([i] valueArray, [i] valueArray);

    }

    }

    }

    on the other

    {

    Alert ("you cannot add it" "+ theValue +'".) Please contact the administrator of the application. ") ;

    }

    }

    ->

    < /script >

    {code}

    I have this above function JS in a section of text of element the element of P3_LM_USES list manager post. Please help me with your suggestions for the button Delete.

    Thank you

    Orton

    Hello

    I was able to solve the problem by replacing the default functionality of the list manager delete button using a JS/AJAX process. FYI, here's the JS function.

    {code}

    function deleteListElement (toList)

    {

    Alert ("Hello in function");

    var x = $x ('P3_LM_USES');

    for (var i = 0; i)< x.options.length;="">

    {

    If (x.options [i] .selected is true)

    {

    Alert (x.options [i] .value);

    var ajaxRequest = new htmldb_Get(null,&APP_ID.,'APPLICATION_PROCESS=VALIDATE_REMOVE_USE',0);

    ajaxRequest.addParam('x02',x.options[i].value);

    var ajaxResult = ajaxRequest.get ();

    If (ajaxResult == 1)

    {

    var y = x.remove (i);

    alert (y + 'removed');

    }

    on the other

    {

    Alert ("you can't remove this" ' + x.options [i] .value +' "item in the list.) Please contact the database administrator.') ;

    }

    }

    }

    }

    {code}

    Thank you

    Orton

  • the extension of the button class

    Hi all

    I am trying to extend the button class to include the ability to click on the button when a user presses the enter keyboard key. I don't know how I would go all this. There are two private functions that control the press and release of the key; buttonPressed() and buttonReleased(), as well as private property ButtonPhase who seem to control this feature. At first I thought I have cancel the keyDownHandler and keyUpHandler, because they allow the user to click the button with the space bar, but it will not work with the private sector functions and property. Any ideas on how I could achieve this without having to copy and modify the original button class would be greatly appreciated. Does anyone know why the developers chose to have the click button when the space is hit instead of the Enter key? It seems to me that the Enter key is a keyboard shortcut much more intuitive than the SPACEBAR.

    Thanks for your help

    Recently, I had the same problem extend the Button class and override two methods as follows

    override the keyDownHandler(event:KeyboardEvent):void function
    {
    super.keyDownHandler (event);

    If (event.keyCode is Keyboard.ENTER)
    {
    this.dispatchEvent (new MouseEvent (MouseEvent.CLICK));
    }
    }

    override the keyUpHandler(event:KeyboardEvent):void function
    {
    super.keyUpHandler (event);

    If (event.keyCode is Keyboard.ENTER)
    {
    this.dispatchEvent (new MouseEvent (MouseEvent.MOUSE_UP));
    }
    }

  • How can I change the default zoom for the new tab only?

    The new tab in Firefox 33 zoom is too high to see all 12 of my thumb nail. I changed it using ctrl - but the next time I opened a new tab, the zoom is 100%. How can I change the default zoom for the new tab only?

    I posted a style rule to shrink the tiles, which allows several of them on the page, but naturally reduces their legibility. You can experiment with the dimensions to find a look that works for you.

    https://userstyles.org/styles/106326/shrink-new-tab-thumbnails

    I use the Stylish extension to experiment because of its preview function that allows me to see the effect quickly. You can install it from the site of modules, then after restart of Firefox while searching for his "S" icon in the toolbar to manage Styles so you can edit and experiment.

    https://addons.Mozilla.org/firefox/addon/stylish/

  • Keyboard shortcuts for the buttons works irregularly - why?

    When you use the access key for the button attributes, they work sometimes and not others. Three behaviors are observed:

    -use the accesskey times moves the focus and click on the button (correct behavior)

    -use the access key moves the focus only - do not by clicking on the button

    -use the accesskey does nothing

    These problems occur without change installation, restart, etc..

    What could cause this?

    Moreover, 3.6.28 works very well with the exact same web application.

    It might be useful to have a small script for conducting a census of the keyboard shortcuts page. You can open the web console (Ctrl + Shift + k), paste the following options next to the circumflex accent ("' >" ") and press ENTER. A new element is added at the end of the body with the results.

    var aks=document.querySelectorAll("a[accesskey], button[accesskey], input[accesskey]"); var out=document.createElement("pre"); for(var i=0; i<aks.length; i++) out.appendChild(document.createTextNode("Tag:'"+aks[i].nodeName+"'; id:'"+aks[i].id+"'; name:'"+aks[i].name+"'; key:'"+aks[i].getAttribute("accesskey")+"'\n")); document.body.appendChild(out);
    
  • How can I change the default language for the spell checker? -solved, somehow...

    As the previous thread was closed without a real resolution - https://support.mozilla.org/en-US/questions/941350?esab=a & s = & r = 0 & as = s

    I managed to solve this problem on my end by reinstalling just firefox using the location of the language of the dictionary by default that I wanted to leave here - http://www.mozilla.org/en-US/firefox/all/

    A shame that the main download page does not select the relevant location for you and still more for changing the default language for the spell checker built is so much kak. Well.

    Right-click web page

    • [x] check spelling

    Language > choose language for spell check...

  • How can you specify the default value for the undefined array elements

    According to aid LV, the tables have two default values, the normal default value and the default value for the undefined array elements.

    I assume that there must be a way to specify the default value for later, but I can't find it anywhere.  Any ideas?

    I know that you can drag the item out of the table container.  Change the default value on this scalar element.  Then drag the item in table tank.

  • 'Environment of the user' Windows cannot load the user's profile, but you have logged on with the default profile for the system.

    Original title: the user environment

    After starting windows, on the Welcome screen, this message always comes.
    "User environment.
    Windows cannot load the user's profile, but you have logged on with the default profile for the system. DETAIL: Not enough memory is available to process this command.
    And all my files that I save before you shut down or restart my pc all the my sample files on the desktop, my documents disappear...

    Thanks... :)

    This is typical of a corrupted profile.  To recover, perform the following steps:

    "How to recover damaged Windows XP user profile"
      <>http://support.Microsoft.com/kb/555473 >

    Almost always, corrupt profiles are accompanied by damaged drive.  During recovery, run a disk check with the /r or /f on your computer option.

    "How to perform disk error in Windows XP check"
      <>http://support.Microsoft.com/kb/315265 >

    HTH,
    JW

  • accidentally, I changed the default program for the openng exe files

    accidentally, I changed the default program for the openng exe files now I can't reverse my mistake and a lot of things on my count no longer works... I cnt play games or open all programs... what should I do?

    http://support.Microsoft.com/kb/950505

    Note at the beginning of the article that it says that Windows 7 users should go directly to the "Fix it myself" section

    Tricky

  • Win7 always tries to connect by using the default profile for the Native WIFI

    Win7 always tries to connect by using the default profile for the Native WIFI
    I defined a new WIFI profile for my home WIFI network. I use a USB of NETGEAR WNA1100 adapter. The profile is configured to connect automatically. I also moved over the default profile for the Native WIFI. Win7 always tries to connect to the default Native WIFI profile and not the profile that I created. Also, when I restart Win7, the default profile for the native WIFI moves to the top of the Profiles list. Also, when I try to change the default Native WIFI profile to use security WPA2 - PSK (AES) instead of WEP, it allows me to make changes, but he comes back to WEP after it treats changes and attempts to connect to the network. How can I fix so that Win7 will use my profile to connect to my home WIFI network and not the Native WIFI as the default profile. Win7 still connect using the default profile of NativeWIFI despite installing a different profile in Control Panel 'Wireless Networks '. I know that I can edit this profile by default, but anyone know how tell Win7 to use a different profile than the default? I tried to change the positions of the profile so that I want to use is facing up, but no, still uses the default. If I try to remove it, it comes back.
    After removing the two profiles and adding the profile for my home network, Win7 automatically added the default profile for the return NativeWIFI. My profile is configured to automatically connect to the network using WPA2 - PSK (AES) security and the default profile for the NativeWIFI (use WEP security) is the Win7 Setup to manually connect. Also, Win7 puts the default profile for the NativeWIFI above my profile. Also, when I delete the profile by default the NativeWIFI, Win7 it always puts back and he goes over my profile. This is starting to resemble the Win7 manage wireless mechanism for allowing users to add and prioritize the profiles of school boards does not work. Here's another thing that happens: when I try to change the security for the profile default of NativeWIFI to WPA2 - PSK (AES) of WEP, Win7 allows me to make changes, but it is up to the WEP after it processes the changes and tries to connect to the network. This seems too much for me, it's a problem with Win7. If I could do this job, so I need not to set up a second profile.
    The adapter I use a NETGEAR WNA1100 works correctly and I use it without any problem. I have is with Win7 and the interface to 'manage wireless networks '. It will not honor the fact that the WIFI profile that I created for my home network must be connected to automatically I installed. He always wants to connect to the default profile NativeWIFI even if I set up my home network profile to connect automatically. I can do a manual connection for my home network without problem. It seems to me that it is a question of Win7.
    Kind regards
    QRP

    Thank you very much - Netgear seems to have finally accepted as the default network!  If all goes well it will stay like this

    MAS

Maybe you are looking for

  • macbook pro start 2011 15 "battery life

    I have only 55 cycles of this battery. It says 'Normal', but the battery lasts about 40 minutes. What's wrong? It's a battery from Apple. I just got the logic board replaced. Mavericks running. 10.6.8 running prior. Before even the question. With thi

  • Wireless can not be activated; SL510 Windows 7

    I have a big problem with my Thinkpad SL510 Windows 7. Everything I try, I'm not able to activate the wireless card. When I diagnose the network connection, it says somethink like "the device is not active or not installed. However, the device is cor

  • evolution of monitors-primary "signal icon is not compatible.

    Original title: change primary monitors. I'm doing my Sharp aquos 40 '' my primary monitor. I have a VGA cable and were able to extend the desktop on the tv, but when I try to make the primary TV appears with a signal icon is not compatible. any idea

  • OK to leave the printer on indefinitely in a State of rest?

    Sorry if this question was asked to the answer in the forums.  I did a search and found nothing. I just bought a LaserJet P1102w and running Mac OS X 10.8.2, but it is not relevant. This printer (and I guess that most of the other HP printers) goes i

  • Sony DV Camcorder Driver causing blue screen with Windows 7 Edition LeAPC_INDEX_MISMATCHErreur Home Premium

    I've been uaing ULEAD VideoStudio 11.5 Plus Edition to capture video in Windows XP without any problems via ilink cable 1394 and I just new PC of Dell Studio XPS 435 t Intel i7920 2.67 Ghz 9.0 GB of RAM Windeos 7 Home Premium 64 - bit operating syste