No, you're not missing anything obvious, it's just hard to keep track of past email discussions on this topic, sorry.You have a choice; either go dig in the Button class to see how they are rotating the arrow, wait for me to do it this evening, or go take 2 minutes to create the arrows yourself, and use bitmap skins.
I gotcha! appreciate the offer, but I'm a glutton for punishment too. :) Not being a Flasher, this could be a good exercise in AS3 as well as Flex framework. Its kind of surprising the Flex team didn't create a ButtonArrow class that could be reused on other components. I guess the datechooser is the only control using it though, eh?
I'd vote for the later: Quick, no dependencies, and it'll get you a solution that works sooner than later. You're not using the framework, but it's a frikin' arrow, whoop-dee-doo, know what I'm sayin'?Just go into your image editing program (Fireworks / Photoshop):- create arrow, both left and right- save as PNG with transparency- embed as the upSkin for NextButton next arrow, and left arrow for the PrevButtonIf you set those in the CSS, you'll be able to do:<view:PrevButton /><view:NextButton />And they'll automatically use the skin. This reduces the amount of code you'll need to write and makes it easy to modify the arrow application wide later. The DateChooser's arrow shouldn't be that hard to duplicate.
righto, I've been reading up on skinning on adobe's site. Yeah, in this case it is a simple button. Larger picture, what if the theme is changed on the application? Will this method incur changes to the custom skin or would it automagically use the new theme?
thanks again...off and running..well not literally, its too bloody hot in atlanta!
DK
----- Original Message -----From: Douglas KnudsenSent: Monday, July 24, 2006 12:25 PMSubject: Re: [flexcoders] Flex arrows?did that
<?xml version="1.0" encoding="utf-8"?>
<mx:Button xmlns:mx="http://www.adobe.com/2006/mxml"
upSkin="mx.skins.halo.DateChooserMonthArrowSkin "
downSkin="mx.skins.halo.DateChooserMonthArrowSkin"
overSkin="mx.skins.halo.DateChooserMonthArrowSkin"
disabledSkin="mx.skins.halo.DateChooserMonthArrowSkin"
styleName="DateChooser"
autoRepeat="true" focusEnabled="false"
>
</mx:Button>
all it does is display a arrow. Can't tell it to use left or right arrow and no button skin. Am I missing something really obvious?
DK
On 7/24/06, JesterXL <[EMAIL PROTECTED]> wrote:I can't remember what email, but I showed the CSS. Can't you just use the same DateChooser CSS?NextButton{upSkin: ClassReference("mx.skins.halo.DateChooserMonthArrowSkin");downSkin: etc.....}Then, just make a MXML file that extends Button.???----- Original Message -----From: Douglas KnudsenSent: Monday, July 24, 2006 12:01 PMSubject: Re: [flexcoders] Flex arrows?gotcha!
Now the question, I want to create a custom component called NextButton that acts the same as the one in the DateChooser and inherits the skin the same as the one in the DateChoser thus seemlessly interacting with the Flex framework. Adobe has let loose the source code for DateChooser. Does Adobe envision some of us copying some of their code in order to fulfill such a community benefiting component?
DK
On 7/24/06, JesterXL <[EMAIL PROTECTED] > wrote:My guess is that was done for filesize reasons. The resulting SWF is smaller since ActionScript bytecode is a lot smaller via lzw compression than a PNG/GIF via the same. While the drawing is more CPU intensive, you cut corners for filesize where you can, and I understand their justification.----- Original Message -----From: Douglas KnudsenSent: Monday, July 24, 2006 11:27 AMSubject: Re: [flexcoders] Flex arrows?update...had some pressing issues.
looking at \frameworks\source\mx\skins\halo\DateChooserMonthArrowSkin.as
looks like this thing does not even use a graphic at all. Code in there actually draws the arrows! I suppose this way screen scaling is a non-issue.
DK
On 7/20/06, Douglas Knudsen <[EMAIL PROTECTED]> wrote:right, but I really don't want to creat a new skin, I want ot use the existing skin so that it inherits all the Halo goodness, eh?
I still have not got this working yet. Looking deeper into the source for the DateChooser and the DateChoser skin I have found that the code actually draws the arrow. The DateChooser code adds styles like prevMonthOverSkin and nextMonthOverSkin with default values. These styles names are expected in teh programmatic skin and do not exist in the Button class. So Jester, me got brave...not so brave as Mel Gibson mind you, I like me entrails!
This is a excerpt:
fwdMonthButton = new Button();
fwdMonthButton.styleName = this;
fwdMonthButton.autoRepeat = true;
fwdMonthButton.focusEnabled = false;
fwdMonthButton.upSkinName = "nextMonthUpSkin";
fwdMonthButton.overSkinName = "nextMonthOverSkin";
fwdMonthButton.downSkinName = "nextMonthDownSkin";
fwdMonthButton.disabledSkinName = "nextMonthDisabledSkin";
ugh where does Button.upSkinName come from? Its not in th edocs that i can see.
DK
On 7/20/06, juan sanchez <[EMAIL PROTECTED]> wrote:download the default skin here.
On Jul 20, 2006, at 7:56 AM, Douglas Knudsen wrote:
no workie....hope jester's bag of tricks is deep!
I looked around the Flex SDK source and see no arrow pngs at all, many other pngs though. My guess is the arrows are compiled in a swc somewheres, which means they should be 'grabable' eh? Be nice to use any graphics in the SDK in custom components to maintain the 'Flexiness', eh?
What I'm trying to do is create a next/previous month browser. We have reports that users run on a month end basis, the datechoser is really not the right tool for this. I'm just using mxml to do this currently...suppose I will have to go off and lear the way of the force for building components soon.
DKOn 7/19/06, JesterXL < [EMAIL PROTECTED]> wrote:Hrm... try:<mx:Button click="onPrev()" upSkin="mx.skins.halo.DateChooserMonthArrowSkin" />If that doesn't work, I have more ideas.The skin is already imported in the defaults.css , so she IS in there.----- Original Message -----Sent: Wednesday, July 19, 2006 4:00 PMSubject: Re: [flexcoders] Flex arrows?hmm, ok, I'm lost when it comes to fancy UI stuff :) How do you make use of this?
<mx:Button click="onPrev()"
upSkin="DateChooserMonthArrowSkin" />
throws a def not found error. Do I import the sckin somehow?
DK
On 7/19/06, JesterXL < [EMAIL PROTECTED]> wrote:Found these digging in DateChooser.as. I'm assuming these skins are compiled into the base framework. Try using like DateChooserMonthArrowSkin as one of your upSkins and see what happens.* nextMonthDisabledSkin="DateChooserMonthArrowSkin"
* nextMonthDownSkin="DateChooserMonthArrowSkin"
* nextMonthOverSkin="DateChooserMonthArrowSkin"
* nextMonthUpSkin="DateChooserMonthArrowSkin"
* nextYearDisabledSkin="DateChooserYearArrowSkin"
* nextYearDownSkin="DateChooserYearArrowSkin"
* nextYearOverSkin="DateChooserYearArrowSkin"
* nextYearUpSkin="DateChooserYearArrowSkin"
* prevMonthDisabledSkin="DateChooserMonthArrowSkin"
* prevMonthDownSkin="DateChooserMonthArrowSkin"
* prevMonthOverSkin="DateChooserMonthArrowSkin"
* prevMonthUpSkin="DateChooserMonthArrowSkin"
* prevYearDisabledSkin="DateChooserYearArrowSkin"
* prevYearDownSkin="DateChooserYearArrowSkin"
* prevYearOverSkin="DateChooserYearArrowSkin"
* prevYearUpSkin="DateChooserYearArrowSkin"----- Original Message -----Sent: Wednesday, July 19, 2006 3:19 PMSubject: [flexcoders] Flex arrows?So, I'm creating a custom component with next/previous functionality. I'd like to use the same arrows on say the DateChooser control. Are these avaialbale to the developer somehow?
DK
--
Douglas Knudsen
http://www.cubicleman.comthis is my signature, like it?
--
Douglas Knudsen
http://www.cubicleman.com
this is my signature, like it?
--
Douglas Knudsen
http://www.cubicleman.com
this is my signature, like it?
--
Douglas Knudsen
http://www.cubicleman.com
this is my signature, like it?
--
Douglas Knudsen
http://www.cubicleman.com
this is my signature, like it?
--
Douglas Knudsen
http://www.cubicleman.com
this is my signature, like it?
--
Douglas Knudsen
http://www.cubicleman.com
this is my signature, like it?
--
Douglas Knudsen
http://www.cubicleman.com
this is my signature, like it? __._,_.___
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
YAHOO! GROUPS LINKS
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.