Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7525479
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T03:33:31+00:00 2026-05-30T03:33:31+00:00

I have created a custom skin for DropDownList (i.e modified the default spark.skins.spark.DropDownListSkin )

  • 0

I have “created” a custom skin for DropDownList (i.e modified the default spark.skins.spark.DropDownListSkin) and spark.skins.spark.DropDownListButtonSkin for its button.

I have been able to get it to do almost everything I wanted, except for getting the list that drops down to align to the right of the button. Setting <s:PopUpAnchor popUpWidthMatchesAnchorWidth=*false* /> in the button sub-skin allows the list to be determined by the width of the items, because obviously the width of the button/entire control is far less than required.

Here is what it looks like now (default popUpPosition=”bottom”)

popUpPosition="bottom"

Setting popUpPosition=”right”

popUpPosition="right"

Here is what I would like it to look like

Imagined "bottom right" alignment

So at this point, I either need to dig into all the spark source code for DropDownList to better understand how things work, or perhaps someone here knows how to do this already.

Any ideas would be appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T03:33:33+00:00Added an answer on May 30, 2026 at 3:33 am

    You can create a custom PopUpAnchor class which extends from PopUpAnchor, and override its determinePosition function to modify how PopUpPosition.BELOW behaves:

    override mx_internal function determinePosition(placement:String,
      popUpWidth:Number, popUpHeight:Number,matrix:Matrix,
      registrationPoint:Point, bounds:Rectangle):void
    {
      switch(placement)
      {
        case PopUpPosition.BELOW:
          registrationPoint.x = -popUpWidth + unscaledWidth;
          registrationPoint.y = unscaledHeight;
          break;
        case PopUpPosition.ABOVE:
          registrationPoint.x = 0;
          registrationPoint.y = -popUpHeight;
          break;
        case PopUpPosition.LEFT:
          registrationPoint.x = -popUpWidth;
          registrationPoint.y = 0;
          break;
        case PopUpPosition.RIGHT:
          registrationPoint.x = unscaledWidth;
          registrationPoint.y = 0;
          break;            
        case PopUpPosition.CENTER:
          registrationPoint.x = (unscaledWidth - popUpWidth) / 2;
          registrationPoint.y = (unscaledHeight - popUpHeight) / 2;
          break;            
        case PopUpPosition.TOP_LEFT:
          // already 0,0
          break;
      }
    }
    

    Setting registrationPoint.x = -popUpWidth + unscaledWidth aligns it with the right edge of the button.

    Within your DropDownList skin replace the PopUpAnchor tag with your newly created class and you should have a DropDownList which behaves as you requested.

    Perhaps there’s a saner way of doing this, but I’d rather spend my time not finding out what that is.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created a usercontrol (a custom button control), how to apply skin on
I have created my custom field type for listing available users in to Dropdownlist.
I have created a custom template and skin for my multilingual magento website, my
i have created custom components in flex where i have used a button,i want
I have created custom ctextbox with the following code. But I am not able
In my app i have created custom cell with 2labels and one check button.when
I have UITableView.In that i have created custom cell with accessory button.Now by clicking
I have created custom menu in my application, i have already set its background,border
I have created custom MembershipUser, MembershipProvider and RolePrivoder classes. These all work and I
I have created custom posts and I want one page in my site to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.