Use of a ToggleSwitch inside a Scroller

The ToggleSwitch introduced in 4.6 looks like a great component that really gives a mobile feel to what would otherwise be a simple checkbox.  While I am somewhat dissapointed that a new skin is required to set the selected and unselected labels, I can get through that.
The issue I am having is with the use of a ToggleSwitch inside a Scroller.  If you place a ToggleSwitch inside a Scroller and fill the rest of the scroller with enough content, then the vertical scrolling action of the Scroller will interfere with the ToggleSwitch's horizontal scrolling.  While using the ToggleSwitch to move from left to right, if the user barely moves up or down, then the Scroller will scroll.  This will break the interaction with the ToggleSwitch.  Usually this will snap the ToggleSwitch to the closest position, left or right.  However, many times the ToggleSwitch's thumb is within the middle 2/3 of the ToggleSwitch.  In this case, the thumb will hang in the middle of the switch!
This can be very confusing for a user, as their selection will not be completed.  While it may appear that the ToggleSwitch has no selection, or is even (just almost) in the selected/unselected state... it could very well be in the opposite state.
Has anyone found any kind of workaround to this issue?

Thanks for the reply.  I think my explanation might have been a little off.  It sounds like your solution would be for scrolling into a ToggleSwitch, not out of the ToggleSwitch.  Still, it got me thinking of another method that looks to work.
I turn off the scroller's vertical scrolling while the switch is in use, and then turn it back on when the switch is finished.  I also force a reset of the switch's selection if the user mouses out of the switch.  This keeps it from getting visually hung between selected/unselected.
protected function toggleSwitch_MouseDown(event:MouseEvent):void
                                             scrollerContent.setStyle('verticalScrollPolicy', ScrollPolicy.OFF);
                              protected function toggleSwitch_MouseOut(event:MouseEvent):void
                                             scrollerContent.setStyle('verticalScrollPolicy', ScrollPolicy.ON);
                                             toggleSwitch.selected = toggleSwitch.selected;
                              protected function scrollerContent_MouseUp(event:MouseEvent):void
                                             scrollerContent.setStyle('verticalScrollPolicy', ScrollPolicy.ON);

Similar Messages

  • How to print content inside a scroller in Adobe Air

    Hi experts,
    I am currently working on an Adobe AIR application that shows the  user some graphical data. As this data is more in height to fit the  screen height, I've placed it inside a scroller.
    Now I want to take a print of this visual data, mostly some charts  and lists but I only see a single page containing only the part of the  screen that is currently visible to the user. I want to have the entire  content inside the scroller to appear on the page.
    I tried using both PrintJob and FlexPrintJob but couldn't find a way  around. Can anyone please help me by providing an insight, some source  code will be greatly appreciated.
    Looking forward to your replies,
    Thanks

    Alex,
    From http://www.darronschall.com/weblog/2005/11/the-secret-to-printing-in-flex.cfm,
    I adjusted my code to
            if (printJob.start())
                FlexGlobals.application.contentGroup.clipAndEnableScrolling = false;
                results.scroller.viewport.clipAndEnableScrolling = false;
                setTimeout(continuePrinting, 250)
            function continuePrinting():void
                printJob.addPage(results.scroller.viewport as Sprite);
                printJob.send();
                results.scroller.viewport.clipAndEnableScrolling = true;
                FlexGlobals.application.contentGroup.clipAndEnableScrolling = true;
    Now it does print a small portion of invisible portion, but the view of limited to a single page. I observed the contentHeight property of the viewport and it is 6097. But the printout is limited to a single page. I also tried giving a rectangle as the second parameter for the addPage method of printJob giving the height of viewPort.contentHeight but of no use.
    How are you suggesting to create a new view of viewport outside the scroller ? Can you please paste some code for reference for better understanding of your suggestion?
    Thanks

  • How can I stop Firefox from changing Tabs/pages when I use the up/down arrows for scrolling?

    A recent update is causing the browser to switch between tabs, or even go on to other pages, when I use the keyboard navigation arrows to scroll down the page. This is aggravating, especially when filling out a form, which can submit before completion. The tab switching occurs mostly when the focus is not in a specific portion of the web page, such as when I have selected a tab. I I can find no way to disable this behavior.
    Win 7 Ultimate fully patched, Firefox version 35.0.1

    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem.
    *Switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance
    *Do NOT click the Reset button on the Safe Mode start window
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

  • IPod is using voice over and won't scroll. What setting did my child click? It will allow me to use voice control, but i need to know what's wrong first so I can give the correct command.

    My daughter's iPod is using voice over and won't scroll. What setting did my child click? It will allow me to use voice control, but i need to know what's wrong first so I can give the correct command.

    VoiceOver is an Accessibility feature while Voice Control allows you to control the Music app via voice.
    To turn off VoiceOver triple click the Home button and go to Settings>General>Accessibility and turn it off. Use three fingers to scroll if necessary.
    iPhone: Configuring accessibility features (including VoiceOver and Zoom)
    iOS: Getting started with VoiceOver for accessibility

  • Problem using jsp:include from inside a custom tag

    Hi, All !
              I have a problem using <jsp:include> from inside a custom tag. Exception is:
              "java.lang.ClassCastException: weblogic.servlet.jsp.BodyContentImpl"
              Apparently, weblogic tries to cast BodyContentImpl to JspWriterImpl and
              could not do this. Is it a bug, since in the 1.1 spec is said: "The
              BodyContent is a subclass of JspWriter that can be used to process body
              evaluations so they can retrieved later on."
              My code is:
              <wfmklist:items>
              <jsp:include page="item.jsp" flush="true"/>
              </wfmklist:items>
              

    This is an area of contention with WL. It is not so tolerant with regards to
              the spec. I spent several days recently trying to convince it to accept the
              specification in regards to bodies and includes and it appears to have
              successfully rebuffed my efforts.
              Frankly, this is very disappointing. It appears that some shortcuts were
              taken on the way to JSP 1.1 support, and the result is a very hard-coded,
              inflexible implementation. As I have not seen the implementation myself, I
              hate to assume this, however one could posit that the term "interface" was a
              foreign concept during the implementation, other than as some annoying
              intermediary reference requiring an immediate cast to a specific Weblogic
              class, which in turn is apparently required to be final or have many final
              methods, as if being optimized for a JDK 1.02 JIT.
              I am sorry that I don't have any positive suggestions other than to use a
              URL object to come back in an execute the necessary "include" directly. You
              lose all context (other than session) and that can cause its own problems.
              However, you can generally get the URL approach to work, and you will
              hopefully avoid further frustration.
              Peace,
              Cameron Purdy
              Tangosol, Inc.
              http://www.tangosol.com
              Tangosol: How Weblogic applications are customized
              "Denis" <[email protected]> wrote in message
              news:[email protected]...
              > Hi, All !
              > I have a problem using <jsp:include> from inside a custom tag. Exception
              is:
              > "java.lang.ClassCastException: weblogic.servlet.jsp.BodyContentImpl"
              >
              > Apparently, weblogic tries to cast BodyContentImpl to JspWriterImpl and
              > could not do this. Is it a bug, since in the 1.1 spec is said: "The
              > BodyContent is a subclass of JspWriter that can be used to process body
              > evaluations so they can retrieved later on."
              >
              > My code is:
              > ...
              > <wfmklist:items>
              > <jsp:include page="item.jsp" flush="true"/>
              > </wfmklist:items>
              > ...
              

  • Filtering records using a start routine inside the update rules for a dmart

    Hi
    I am using a start routine inside the update rules. I want to filter out all records that have 0 in all three fields. My problem is that it not only filters these records, but also filter records with negative values, which I do not want. Only 1 field has a negative value, the other 2 have 0.
    I have tried:
    DELETE DATA_PACKAGE where  /BIC/ZBILLCONS = 0 and /BIC/ZBREVPRIM = 0  and /BIC/ZBREVSUBO = 0 .
      DELETE DATA_PACKAGE where ( /BIC/ZBILLCONS = 0 and /BIC/ZBREVPRIM = 0  and /BIC/ZBREVSUBO = 0 ).
    also tried:
    delete DATA_PACKAGE where /BIC/ZBILLCONS IS INITIAL and
    /BIC/ZBREVPRIM IS INITIAL and  /BIC/ZBREVSUBO IS INITIAL.
    The records are going to 1 cube and 1 ODS, I only have the start routine in 1 update rule. I  view the filtering in the PSA.
    Has anyone ran into this before?

    Try
    delete data_package where /BIC/ZBILLCONS = '0' and /BIC/ZBREVPRIM = '0' and /BIC/ZBREVSUBO = '0' .
    OR
    delete data_package where /BIC/ZBILLCONS EQ '0' and /BIC/ZBREVPRIM EQ '0' and /BIC/ZBREVSUBO EQ '0' .
    Good luck!

  • Use a package function inside a select of the same package

    Hi.
    How can i use a function defined inside a package, with a select used inside that same package ?
    Example
    ... package example
    CREATE OR REPLACE PACKAGE BODY pkg_example
    AS
         FUNCTION sum_two_values(p_val1 NUMBER,p_val2 NUMBER) RETURN NUMBER
         IS
         BEGIN
         RETURN p_val1 + p_val2;
         END sum_two_values;
         FUNCTION use_another_function_example RETURN VARCHAR2
         IS
         v_value NUMBER;
         BEGIN
         SELECT sum_two_values(2,2) INTO v_value FROM dual;
         RETURN 'waaaazzzzupppppp'
         END use_another_function_example;
    END pkg_example;
    This will not work
    -- SELECT sum_two_values(2,2) INTO v_value FROM dual;
    How can i call a function inside a select statement, a function of the same package where the query is being called.
    (i have Oracle 9.2x)
    Cheers.

    are you sure? you are not using package1, you are using pack1
    SQL> CREATE OR REPLACE PACKAGE package1
      2  IS
      3     FUNCTION f1
      4        RETURN NUMBER;
      5 
      6     FUNCTION f2
      7        RETURN NUMBER;
      8  END;
      9  /
    Package created.
    SQL> CREATE OR REPLACE PACKAGE BODY package1
      2  IS
      3     a   NUMBER;
      4 
      5     FUNCTION f1
      6        RETURN NUMBER
      7     IS
      8     BEGIN
      9        RETURN 1;
    10     END;
    11 
    12     FUNCTION f2
    13        RETURN NUMBER
    14     IS
    15     BEGIN
    16        SELECT package1.f1
    17          INTO a
    18          FROM DUAL;
    19 
    20        RETURN a;
    21     END;
    22  END;
    23  /
    Package body created.
    Why not just this
    SQL> ed
    Wrote file afiedt.buf
      1  CREATE OR REPLACE PACKAGE BODY package1
      2  IS
      3     a   NUMBER;
      4     FUNCTION f1
      5        RETURN NUMBER
      6     IS
      7     BEGIN
      8        RETURN 1;
      9     END;
    10     FUNCTION f2
    11        RETURN NUMBER
    12     IS
    13     BEGIN
    14        a:= f1;
    15 RETURN a;
    16     END;
    17* END;
    SQL> /
    Package body created.formatted
    Message was edited by:
    devmiral

  • How to use h:selectOneRadio tag  inside h:dataTable tag

    Hi All,
    Can any one tell me how to use <h:selectOneRadio> tag inside <h:dataTable> tag and how to get selected radio button value in bean ?

    JSF<h:selectOneMenu value="#{myBean.selectedItem}">
        <f:selectItems value="#{myBean.selectItems}" />
    </h:selectOneMenu>MyBeanprivate String selectedItem;
    public String getSelectedItem() {
        return selectedItem;
    public void setSelectedItem(String selectedItem) {
        this.selectedItem = selectedItem;
    public List getSelectItems() {
        List selectItems = new ArrayList();
        selectItems.add(new SelectItem("key1", "value1"));
        selectItems.add(new SelectItem("key2", "value2"));
        selectItems.add(new SelectItem("key3", "value3"));
        return selectItems;
    }String selectedItem should contain the key (key1, key2 or key3) when selected. The values (value1, value2 and value3) are the options as shown in the list.

  • Can i use a environment variable inside a *.sql file?

    Hello,
    I want to create a external table.
    So i am using the command
    create or replace directory abc as 'C:\folder'.... inside a sql file.
    Now i want the path "C:\folder" to be dynamic as i am using this path in many other places also inside the sql file.So i thought to create a environment variable and put this value there.I tried using as %PATH% but it gives error..... where %PATH%=C:\folder.
    Can i use a environment variable inside a *.sql file?
    But how to do that or is there any other way.
    Thanks
    Swapna
    Edited by: user11018268 on Feb 19, 2010 1:03 AM

    user11018268 wrote:
    Actually what i want is the path "C:\folder" is not fixed it can be anything which i may not know the user may decide it later. Not supported. A directory object refers to a specific physical location (directory/folder) on a file system. Not a path.
    You can work around it by (creating and) using a function (running under a super user schema with authid definer privs). The caller (e.g. schema scott ) calls it with a physical path. E.g. GetDirectoryObject( 'C:\folder\2010\feb\week4' ).
    This function determines if there is an existing directory object for the path. If not, it uses a wildcard search to determine if there are any directory objects for parents in the path (e.g. for C:\folder\2010\feb or C:\folder\2010 or C:\folder ).
    If it finds a directory object, it interrogates the data dictionary to determine if the caller, schema scott for example, has read/write access on that directory object. If it has, it creates a new directory object and grants the caller read/write access to it. The function then returns the name of the directory object to the caller.
    The caller thus do not deal directly with directory objects. The function returns the object name given a physical path as input. Also, only a single base directory needs to be created (e.g. for C:\folder ) and access granted to the schema on it. Any sub-directory in that base directory can now be dynamically accessed by the schema.

  • HT3939 if I purchased iPhone 5 GSM A1429, then I tried to use CDMA SIM card inside the same phone, does it'll work and provide me signals ???

    Hi All,
    Regarding iPhone 5, at the latest model, if I bought an unlocked one from UK Apple Store,  iPhone 5 GSM   A1429, then I tried to use CDMA SIM card inside the same phone, does it'll work and provide me signals or not. ??
    Thanks for your answering.

    The answer is complicated. None of the major carriers offer PAYG service in the US, but if you buy a contract-free phone for full price you can get a plan that can be canceled at any time from any of the major carriers (AT&T, Verizon, Sprint and T-Mobile). There are smaller resellers that offer PAYG service (StraightTalk, for example), but they are hard to deal with.
    The most liberal is the GSM carrier T-Mobile. They have "unbundled" the phone from the service, so if you bring your own phone or pay full price for a phone the monthly cost will be lower.
    The other 3 will charge you the same monthly cost whether you pay full price for the phone or get a subsidized phone.
    Verizon iPhone 5 series phones are unlocked out of the box for international use (thanks to a condition the FCC imposed on Verizon when they were allowed to buy a substantial chunk of spectrum). They are the only phones sold in the US that will work on LTE bands in the UK and Europe.
    Sprint is not a good choice, because they give you a hard time if you want to unlock your phone.
    AT&T phones are locked, but they will unlock the phone if you pay full price or pay off your early termination fee. However, they will only work on GSM in the UK, not on LTE (4G).

  • Can't use the erase tool inside a Layer Mask

    Recently after updating Photoshop CC I noticed that I can no longer use the erase tool inside of a Layer Mask to add or remove areas from/to the mask. The paint brush tool still works inside the mask but the erase tool does not. Any ideas why?

    Make sure your foreground/background colors are set to BW. And, make sure your foreground color is set to the same color you want to erase from the Layer Mask: Black if you want to erase (turn white) the black part of the mask, White if you want to erase (turn black) the white part of the mask.

  • Using Accordion Style text inside Flash

    Looking for some ideas on how I could have text object with a link inside to display the information below the link still inside the text object. My thoughts were to use an html file inside the text object and have links that would display an accordion like text below the link. Before I start venturing in this direction, thought there may be a better approach?
    Basic concept: Paragraph of text, inside the paragraph a link. When clicked the additional text appears below the link and the rest of the text pushes down, musch like an accordion style panel.
    Look inside SPRY and there is nothing there.
    Any ideas?
    THANKS

    That's because it's probably stripping the characters it doesn't like, such as HTML and formatting. Your best strategy at that point is to convert it before you send it through your script so your script tolerates it. You can try the encode() function run on your string which will URL encode it and the decode() function can restore it. Otherwise you need to replace anything your script doesn't like with something else intentionally. e.g. turn <i>italics</i> into [i]italics[/i] and then later fix it.
    I myself would look at what PHP is doing. Chances are it's running the striptags function. It's just a safety measure to stop SQL injections (make code safer). But that may not be what you want. If you're at all uncomfortable with that, you'd best not do it though. You take the risk someone will sneak something in that you do not want.

  • When I try to use ITunes Radio the screen just scrolls and plays the same song over and over

    When I try to use ITunes Radio the screen just scrolls and plays the same song over and over again?

    - First try resetting the iPod to make it visible in iTunes
    Reset iPod touch:  Press and hold the On/Off Sleep/Wake button and the Home
    button at the same time for at least ten seconds, until the Apple logo appears.
    - Next try placing the iPod in recovery mode:
    iPhone and iPod touch: Unable to update or restore
    - Last try placing the iPod in DFU mode:
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings

  • Measurment through a vibration sensor interfaced with Ni-PXI is very low & less responsive. I wana know any frequency limitations is there for PXi or the system uses any clipping ckts inside ???

    Measurment through a vibration sensor interfaced with Ni-PXI is very low & less responsive. I wana know any frequency limitations is there for PXi or the system uses any clipping ckts inside ???

    It would be helpfull to know what PXI hardware and what sensor you are using.
    Up to now I only found mechanical limitations ....
    (Creating a 100kHz sinus exitation with 160nm amplitude need more than 63km/s² (>6400g) acceleration  )
    Greetings from Germany
    Henrik
    LV since v3.1
    “ground” is a convenient fantasy
    '˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'

  • Hi, how to use touch pad (thinkPad T61) to scroll pages up/down, left/right? do I need any drivers?

    Hi, how to use touch pad (thinkPad T61) to scroll pages up/down, left/right? do I need any drivers?

    Hi daneeo, and welcome to the Lenovo User Community!
    In the Control Panel for your Mouse there should be an UltraNav tab. Under that tab are all the settings for the touchpad. Check to make sure scrolling is enabled.
    If you do not see an UltraNav tab in the Mouse Control Panel, download and install the UltraNav driver and utility:
    http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-66898
    http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-67226
    Hope this helps!
    I don't work for Lenovo. I'm a crazy volunteer!

Maybe you are looking for