Flex 4 HSlider Tick Marks?

How would one go about doing this. I have a class extending the Spark HSlider and a skin for it, but what kind of Display Object should I used to display the values for Tick Marks..
some code below: I figured DataGroup as a possible repeater component, but nothing shows.  Any help being able repeat a set of Lines with X and Y values would be greatly appreciated.
Thanks,
Skitch
PlayerSlider.as (Component):
import mx.collections.ArrayCollection;
    import spark.components.DataGroup;
    import spark.components.HSlider;
    public class PlayerSlider extends HSlider
        [SkinPart(required="false")]
        public var tickMarks:DataGroup;
        public function PlayerSlider()
            super();
        [Bindable]       
        public function set tickValues(value:ArrayCollection):void
            _tickValues = value;
            _tickValuesChanged = true;
            invalidateProperties();
        public function get tickValues():ArrayCollection { return _tickValues; }
        protected var _tickValues:ArrayCollection;
        protected var _tickValuesChanged:Boolean = false;
         * Adding the prompt text to the label if it's available
        override protected function commitProperties():void
            super.commitProperties();
            if (this._tickValuesChanged)
                if (tickMarks)
                    tickMarks.dataProvider = tickValues;
                this._tickValuesChanged = false;
        override protected function partAdded(partName:String, instance:Object):void
            super.partAdded(partName, instance);
            if (instance == tickMarks)
                tickMarks.dataProvider = tickValues;
PlayerSliderSkin.mxml (SkinClass):
<?xml version="1.0" encoding="utf-8"?>
<s:SparkSkin xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark"
    xmlns:fb="http://ns.adobe.com/flashbuilder/2009" minHeight="11" alpha.disabled="0.5" xmlns:mx="library://ns.adobe.com/flex/mx">
    <fx:Metadata>[HostComponent("com.digitalsmiths.util.playerSlider.PlayerSlider")]</fx:Meta data>
    <fx:Script fb:purpose="styling">
        /* Define the skin elements that should not be colorized.
           For slider, the skin itself is colorized but the individual parts are not. */
        static private const exclusions:Array = ["track", "thumb"];
         * @private
        override public function get colorizeExclusions():Array {return exclusions;}
         * @private
        override protected function initializationComplete():void
            useChromeColor = true;
            super.initializationComplete();
    </fx:Script>
    <fx:Script>
         *  @private
        override protected function measure() : void
            // Temporarily move the thumb to the left of the Slider so measurement
            // doesn't factor in its x position. This allows resizing the
            // HSlider to less than 100px in width.
            var thumbPos:Number = thumb.getLayoutBoundsX();
            thumb.setLayoutBoundsPosition(0, thumb.getLayoutBoundsY());
            super.measure();
            thumb.setLayoutBoundsPosition(thumbPos, thumb.getLayoutBoundsY());
    </fx:Script>
    <s:states>
        <s:State name="normal" />
        <s:State name="disabled" />
    </s:states>
    <fx:Declarations>
        <!--- The tooltip used in the mx.controls.Slider control.
               To customize the DataTip's appearance, create a custom HSliderSkin class.-->
        <fx:Component id="dataTip">    
           <s:DataRenderer minHeight="24" minWidth="40" y="-34"> 
              <s:Rect top="0" left="0" right="0" bottom="0">
                    <s:fill>
                        <s:SolidColor color="0x000000" alpha=".9"/>
                    </s:fill>
                    <s:filters>
                        <s:DropShadowFilter angle="90" color="0x999999" distance="3"/>
                    </s:filters>
                </s:Rect>
                <s:Label id="labelDisplay" text="{data}"
                         horizontalCenter="0" verticalCenter="1"
                         left="5" right="5" top="5" bottom="5"
                         textAlign="center" verticalAlign="middle"
                         fontWeight="normal" color="white" fontSize="11">
                </s:Label>
            </s:DataRenderer>
       </fx:Component>
    </fx:Declarations>
    <!--- The default skin class is HSliderTrackSkin.
    @copy spark.components.supportClasses.TrackBase#track
    @see spark.skins.spark.HSliderTrackSkin -->
    <s:Button id="track" left="0" right="0" top="0" bottom="0" minWidth="33" width="100"
              skinClass="styling.skinClasses.sliders.track.HSliderTrackSkin"/>
    <!--- The default skin class is HSliderThumbSkin.
    @copy spark.components.supportClasses.TrackBase#thumb
    @see spark.skins.spark.HSliderThumbSkin -->
    <s:Button id="thumb" top="0" bottom="0" width="4" height="11"
              skinClass="styling.skinClasses.sliders.thumb.HSliderThumbSkin"/>
    <s:DataGroup id="tickMarks" left="0" right="0" top="0" bottom="0" minWidth="33" width="100">
        <s:layout>
            <s:BasicLayout/>
        </s:layout>
        <s:itemRenderer>
            <fx:Component>
                <s:ItemRenderer>
                    <s:Line
                        height="100%">
                        <s:stroke>
                            <s:SolidColorStroke color="0x525254"/>
                        </s:stroke>
                    </s:Line>
                </s:ItemRenderer>
            </fx:Component>
        </s:itemRenderer>
    </s:DataGroup>
</s:SparkSkin>

These threads might be useful for you:
http://forums.adobe.com/message/2486681#2486681
http://forums.adobe.com/message/2476351#2476351
In CustomSlider4.zip there is a skin file called HSliderTrackSkinTicks.mxml that shows a very simple way of implementing tick marks.  DataGroup should work too, but it will be a little trickier to line up the ticks properly.

Similar Messages

  • How to calculate the rotation degree of tick marks

    Hello Again,
    Thanks to so much help that I received here, I've been able to move right along in learning how to perform my job digitally instead of with an old camera. 
    In my last discussion, I learned out to make the tick marks using copies and rotation.  My question now is, how is the rotation calculated so A) I get the correct placement of the tick marks, especially the small ones as there are so many and B) how do I calculate the rotation degree so that I have the proper amount of space at the bottom of the guage/dial?
    Here is an image to help show what I'm asking:
    I know how to get the large tick marks and the small tick marks, if I were placing them evenly around the entire circle, I would know how to do that also - but since I'm placing them around only a portion of the circle (although still evenly) I'm lost.  I can only figure out the space by hit and miss calculations and that is taking much too long.  I would also need to know how much to rotate the entire thing by in order to get the open space at the bottom as shown.
    thanks for your help!

    You need to use transform effects and you can get this in about 10 or so minutes.
    first you need to set up the objects.
    the thick lines I used effect>distort and transform>transform 20 copies angle 14
    thi ones 100 copies angle 2,8
    G

  • Free goods tick mark coming automatically in PO?

    Hi Gurus,
    While creating PO, free goods tick mark coming automatically in PO if i m entering net price..
    I have checked material master as well as vendor master.Nowhere free good maintained in both.
    Then, why it is picking automatically in PO?
    Pls help..

    Hi
    The meaning for invoice receipt check box under invoice tab for any line item is that Po is expected Invoice for that line item.
    If this check box is not set then PO considered free items with no invoice
    So generally Invoice Receipt Check Box are kept in display mode through OMJ4 so that end user can not modify it
    Edited by: Sanjay  Shah on Feb 4, 2010 10:17 AM

  • GR based IV tick mark in PO- not able to post MIRO

    we are working for a indian client with CIN. most of the PO's which is created in SAP system with all Excise parameters and applicable taxes. further all PO's created with GR based IV check box enabled.
    now the issue is, in some of the purchases vendor is not applicable for excise, so there is no excise parameters in the PO, only tax is applicable. for this case we have not maintained vendor excise details in J1ID. but we have maintained material chapter id and CENVAT determination in J1ID. but as i mentioed earlier these PO's also with GR based IV check box enabled.
    If the PO is not excisable no Excise capturing and posting is required, for these types of PO's we are following the below steps
    1. Creation of PO with GR based IV check box enabled
    2. Goods Receipt without excise capturing
    3. Invoice verification - MIRO ( here system is not able to post the docuement because of GR based IV tick mark)
    waiting for the response

    hi,
    thanks for the response
    problem is MIRO is not posting whenever GR made with GR based IV tick in PO.
    i have checked three scenario
    scenario1.
    1. created PO with GR based IV, but there is no Excise or Tax captured in PO ( means no FV11 created)
    2. Created MIGO ( no excise parameter will appear)
    3. MIRO done with respect to MIGO
    this scenario is fine
    Scenario 2 - current scenario
    1. Created PO with GR based IV, No excise is captured in PO but Tax (VAT captured with condition type JVRD) is captured   ( means no FV11 created for VAT only)
    2. Created MIGO ( no excise parameter will appear)
    3. while doing MIRO for this scenario system is not able to post the MIRO because of the VAT in PO and GR based IV tick mark.
    Scenario 3
    1. Created PO without GR based IV, No excise is captured in PO but Tax (VAT captured with condition type JVRD) is captured   ( means no FV11 created for VAT only)
    2. Created MIGO ( no excise parameter will appear)
    3. MIRO system is picking from PO based IV. so, it is allowing to post
    need your expert advice on scenario 2 - how to post MIRO

  • I want to get windows vista on the macbook pro with retina display but my first question is this that how do i install it without using a DVD OR CD disk drive, and my second question while installing windows vista do i have to tick mark the install win 7

    hello i have a few problems and i hope somebody has a solution my first problem is that how can i install windows vista without using a disk drive and my second problem is that should i tick mark the option which says Install windows 7 while using boot camp please reply, Thanks,

    When running Windows in a virtual environment Windows and OSx share your computer's resources such as RAM. Therefore your games can not use all your computer's resources when running.
    If you install Windows natively then Windows and your games can and do use all your computer's resource such as RAM.
    But as already said, older operating systems are not supported and will not run natively using Boot Camp Assistant. You must use Windows 7 if installing natively in Lion or Moubtain Lion.

  • Tick Marks in Corner of Indesign Document

    Hi,
    I am making updates to an indesign document someone else created. There are two small tick marks in all 4 corners of the page (one vertical and one horizontal). The creater advised they were bleed marks. However, I looked in the Document Setup and found that the bleed/slug are both set at 0pt. I have done a lot of research and digging online without success. I also tried to look at the margins/guides, etc and did have much luck. Do you know what could be causing this? I would really like to remove them.
    Thank you!

    Please see the screenshot. The lines are in all 4 corners.  Thanks!

  • Displaying 4 as tick mark in pdf in mozilla firefox 20.0

    I am displaying a pdf in aspx page. In mozilla firefox 20.0, instead of tickmark , 4 is displaying. i.e. when a radiobutton is selected, instead of Tick mark pdf is getting displayed with 4. i am not facing this issue with older mozilla firefox version like 16.0. what is solution or fix for this?
    Thanks & Regards,
    Ammiraju

    hello, firefox 19 has introduced its own integrated pdf viewer - if you want to switch back to the plugin you've used before to view pdfs just go to firefox > options > applications & scroll down and define the default action for the '''portable document format (pdf)'''.
    [[How to disable the built-in PDF viewer and use another viewer]]

  • MS Word 2007 table lines have interesction tick marks

    Hello,
    MS Word 2007 SP2
    Adobe Acrobat 9.0.0 Plus
    A table created in Word, where row lines are shown but not column lines, shows on some lines tick-marks where row and colums would intersect. In AA version 7 this was not an issue, however, when converting from within Word this too was an issue.
    The image below didn't turn out as clear here than the original, but you still can see the Word bit left and AA on the right with the tick-marks.
    How can it be avoided?
    Thank you
    Stefan

    I'm experiencing this myself. I found instructions to navigate to Edit > Preferences > Page Display. Then, uncheck 'Enhance Thin Lines'. This lightens the lines considerably; reducing the very dark, chunky lines. However, table lines are still not the same width/thickness regardless of the zoom level in Acrobat (50% - 800%). And there is no pattern to where thicker lines appear; header rows, odd rows, etc. A random mess. I'm 100% positive the lines are set properly in Word 2007. And interestingly, all tables lines display equal widths consistently in printed copy- when printing from the PDF. The issue seems to be Adobe's electronic page display and that the 'solution' I found does not work. I have the latest version of Acrobat Pro and a colleague has the latest version of the Reader without a writer license-- no conflict of versions or software suite.
    I deliver documentation to customers electronically. My documents have many tables. My deliverables to look unprofessional and unpolished. My deadlines haven't been met due to research and this unresolved issue. Difficult to accept.
    So frustrated!  Please help!
    Jennifer

  • Putting tick mark into check box in smartform

    hi,
       can any one please let me know if i can put a tick mark in the check box of the smartform.
       for example: i need to select one among yes or no check box. how do i do it.
       should i have to upload a graphic of the tick mark and then display or is there any provision in smartforms to do that.

    Hi,
    Check threads like
    smartform- check box
    and
    what r the steps to display check box in smartform
    Eddy
    PS.
    Put yourself on the SDN world map (http://sdn.idizaai.be/sdn_world/sdn_world.html) and earn 25 points.
    Spread the wor(l)d!

  • Graph control right-hand Y-axis tick marks look like negative signs

    Hi,
    The graph control right-hand Y-axis tick marks just to the left of the numeric values that make up the scale look like negative signs.  It gets confusing for the user of the software.
    The left Y-axis is OK because the little tick marks are to the right of the number.
    Any ideas on how to improve this situation?
    Thanks,
    Kirk Mitchell
    Project Engineer
    Kollmorgen

    Perry,
    First of all thanks for looking at this.
    The tick-marks controlled by the "Mark Origin" option are not the tick marks that are causing the problem.
    The Mark Origin ticks are in the body of the graph along the x=0 and y=0 lines.  They only show up if those lines are visible such as if you have a graph with an x axis range of -100 to +100 and a y axis range of the same.
    The ticks I'm referring to are just to the left of the numeric values that label the right axis.
    Below is a screenshot to illustrate:
    Any other ideas?
    Thanks,
    Kirk

  • I want to show tick mark in oracle..

    Dear all,
    i want to show tick mark in my report.
    (Means i'm having table 'Table1' with two column 'col1, col2', the col2 is 'Y','N' check constraints , if i'm selecting the value of 'Y' in col2, i want to show with tick mark(instead of 'Y') in my report... )
    Is ther any oracle functions? could u help me any one pls?
    Thanks in advance
    Regards,
    RengarajR

    This depends on your reporting tool.
    Which are you using?
    Do you use jdeveloper at all? if yes which version?
    Timo

  • Tick marks?

    Can someone explain me the tick marks? So I have all kinds of playlists, and I have never manually used the tick marks, still some songs are without them? Why? Does it have anything to do with the fact that iPod got full and iTunes created this automatic playlist that fits in. BTW, what are the criteria in creating that? First songs in order they happen to be in the library view?

    Tick/check marks are used for 2 main things
    1) If the ipod is set to "Auto Update" you can check songs you want on the ipod and songs you don't want on it can be unchecked. If you add a song to ipod and later want it off, just uncheck it in iTUnes and next time you update the ipod, its removed
    All you have to do is goto edit>Preferences>ipod and check "Only update checked songs"
    2) THere also used to tell iTUnes what to play and what not to play. For example lets say you have a playlist with 4 songs. SOng 1, 2 and 4 are checked, song 3 is unchecked. You start playing song 1, when its done it starts playing song 2. Now when song 2 is done playing it will skip song 3 and start playing song 4

  • Script for overriding category axis tick marks in graphs?

    Hello!
    We are introducing a new graph design, but has a problem with not being able to override the tick marks in the category axis in Illustrator CS5.
    A typical graph (line layout) can have 250 observations, and since we have the tick marks on full width, the graph gets "crowded" with black lines.
    In the value axis there is possibilites for overriding the values, but not on the category axis.
    Is there any way to script so that the tick marks in the category axis can be reduced/overrided to e.g. 1 in 20?
    Please help!

    Script has NO access to live graph data… It can only break them… then fish in the group for bits…

  • The GR-based IV is tick marked & it is in grey Field,Kindly help me how to

    Dear All
    While creating Framework PO,The GR-based IV is tick marked & it is in grey Field,Kindly help me how to remove the tick mark.
    Correction did in Vendor master.Kindly let me know whatelse i have to do.

    Hi!
    If u are using doc. type FO, then see the field slection for that type.
    SPRO - MM- purchasing - p.o - define screen lay out at doc. level - slect FOF - details.
    Here, you can change GR based invoice verification field from display to optional entry.
    Regards
    Gopi Chand

  • Less tick marks in graphs?

    Hello!
    We are introducing a new graph design, but has a problem with not being able to override the tick marks in the category axis in Illustrator CS5.
    A typical graph (line layout) can have 250 observations, and since we have the tick marks on full width, the graph gets "crowded" with black lines.
    In the value axis there is possibilites for overriding the values, but not on the category axis.
    Is there any way to script so that the tick marks in the category axis can be reduced/overrided to e.g. 1 in 20?
    Please help!

    Script has NO access to live graph data… It can only break them… then fish in the group for bits…

Maybe you are looking for