[flexcoders] ToggleButtonBar - how to change color for only one button
I have a tooglebuttonbar (with 4 buttons) and I'd like to change the color of only one or two button according particular data. Is someone has experience to do that. I try to do like that var child:Button; child = Button(tbbAction2.getChildAt(0)); child.setStyle('color', '#CC33CC'); But there's no effect. Thanks a lot.
[flexcoders] ToggleButtonBar, NavBar and selectedIndex - error in accessor implementation?
I found some weird implementation. The inheritance hierarchie is at follows: ToggleButtonBar - ButtonBar - NavBar ToggleButtonBar overrides the accessors and mutators for _selectedIndex. But why is the Accessor implemented in ToggleButtonBar like: override public function get selectedIndex():int { return super.selectedIndex; //return _selectedIndex; } It seems like this can cause a runtime error since 2 _selectIndex fields exist: in ToggleButtonBar and NavBar and both are accessed.
[flexcoders] ToggleButtonBar xml based dataProvider (2)
Still can't understand why the following does not work: code: mx:ToggleButtonBar id=floorlines direction=vertical iconField=icon horizontalGap=5 itemClick=clickHandler (event); labelField=label creationComplete=floorLinesData(); height=100% fontSize=8 fontWeight=bold/ data: root lines id4/id labelG2/label onlinetrue/online icon@Embed('D:/projects/sfcs/assets/status_online.png')/icon /lines lines /root code: floorlines.dataProvider = resultXML.lines; error: Error: ERROR: The dataProvider of 'floorlines' must not contain objects of type flash.display.DisplayObject. at mx.controls::NavBar/set dataProvider()[C:\autobuild\3.2.0 \frameworks\projects\framework\src\mx\controls\NavBar.as:378] at tasktracking/floorLinesShowData() [D:\projects\sfcs\tasktracking\src\tasktracking.mxml:107] at modulecode::Classes/httpResult() [D:\projects\sfcs\UFDCommonLib\src\modulecode\Classes.as:62] at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::di spatchRpcEvent()[C:\autobuild\3.2.0 \frameworks\projects\rpc\src\mx\rpc\AbstractInvoker.as:170] at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::re sultHandler()[C:\autobuild\3.2.0 \frameworks\projects\rpc\src\mx\rpc\AbstractInvoker.as:193] at mx.rpc::Responder/result()[C:\autobuild\3.2.0 \frameworks\projects\rpc\src\mx\rpc\Responder.as:43] at mx.rpc::AsyncRequest/acknowledge()[C:\autobuild\3.2.0 \frameworks\projects\rpc\src\mx\rpc\AsyncRequest.as:74] at DirectHTTPMessageResponder/completeHandler() [C:\autobuild\3.2.0 \frameworks\projects\rpc\src\mx\messaging\channels\DirectHTTPChannel.a s:403] at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at flash.net::URLLoader/onComplete() Thanks
[flexcoders] ToggleButtonBar - disable buttons
Can I disable some buttons in ToggleButtonBar control? Thanks
[flexcoders] ToggleButtonBar xml based dataProvider
Is that possible? Thanks
RE: [flexcoders] ToggleButtonBar xml based dataProvider
Certainly. Why would you think not? Though to speak accurately, you would use XMLList or XMLListCollection as the dataProvider. Tracy Spratt Lariat Services Flex development bandwidth available From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of markgoldin_2000 Sent: Friday, February 20, 2009 3:46 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] ToggleButtonBar xml based dataProvider Is that possible? Thanks
Re: [flexcoders] ToggleButtonBar with one or more ComboBoxes instead of buttons: How to build it?
Thanks, I should be more clear. The dataProvider would be like a Tree's, so for example an array where some of the elements are leaves (- buttons in the bar) and some are arrays (- dropdown lists in the bar) (no deeper arrays, and no folder names). I want the user to be able to choose a single leaf item from the set, either by clicking one of the buttons or by choosing an item in one of the dropdown lists. -A On Tue, Dec 30, 2008 at 2:31 AM, Manish Jethani manish.jeth...@gmail.comwrote: On Tue, Dec 30, 2008 at 5:46 AM, Alan Shaw noden...@gmail.comnodename%40gmail.com wrote: Requesting advice on how to get started making this custom component. A combo box is not exactly a button, so my first question is, how is this ToggleButtonBar with ComboBox going to behave exactly? Manish
Re: [flexcoders] ToggleButtonBar with one or more ComboBoxes instead of buttons: How to build it?
On Fri, Jan 2, 2009 at 11:06 PM, Alan Shaw noden...@gmail.com wrote: The dataProvider would be like a Tree's, so for example an array where some of the elements are leaves (- buttons in the bar) and some are arrays (- dropdown lists in the bar) (no deeper arrays, and no folder names). I want the user to be able to choose a single leaf item from the set, either by clicking one of the buttons or by choosing an item in one of the dropdown lists. All I can say is that you'll have to extend the NavBar class and implement something like a ToggleButtonBar that uses ComboBox as a nav item in a sophisticated way. It's doable. Essentially what you're looking for is a cross between a MenuBar and a ToggleButtonBar, so I would draw inspiration from those two components. Manish -- http://manishjethani.com/
Re: [flexcoders] ToggleButtonBar with one or more ComboBoxes instead of buttons: How to build it?
Thanks! -A On Fri, Jan 2, 2009 at 1:56 PM, Manish Jethani manish.jeth...@gmail.comwrote: On Fri, Jan 2, 2009 at 11:06 PM, Alan Shaw noden...@gmail.comnodename%40gmail.com wrote: The dataProvider would be like a Tree's, so for example an array where some of the elements are leaves (- buttons in the bar) and some are arrays (- dropdown lists in the bar) (no deeper arrays, and no folder names). I want the user to be able to choose a single leaf item from the set, either by clicking one of the buttons or by choosing an item in one of the dropdown lists. All I can say is that you'll have to extend the NavBar class and implement something like a ToggleButtonBar that uses ComboBox as a nav item in a sophisticated way. It's doable. Essentially what you're looking for is a cross between a MenuBar and a ToggleButtonBar, so I would draw inspiration from those two components. Manish -- http://manishjethani.com/
[flexcoders] ToggleButtonBar with one or more ComboBoxes instead of buttons: How to build it?
Requesting advice on how to get started making this custom component. Thanks... -A
Re: [flexcoders] ToggleButtonBar with one or more ComboBoxes instead of buttons: How to build it?
On Tue, Dec 30, 2008 at 5:46 AM, Alan Shaw noden...@gmail.com wrote: Requesting advice on how to get started making this custom component. A combo box is not exactly a button, so my first question is, how is this ToggleButtonBar with ComboBox going to behave exactly? Manish
[flexcoders] ToggleButtonBar (Padding Issue)
Hi, I was working on ToggleButtonBar and I wanted to move the label to the bottom of the button and it seems to be impossible... I tried using paddingBottom= 0, still it does not move . Can anyone please let me know if you have a solution for it ? Thanks, Kumar.
[flexcoders] ToggleButtonBar with bindable labels of Buttons - resourceManager
Dear all, I am using the resourceManager to switch between languages in my flex app. All labels (i.e. of buttons, textfields...) are bound to locale property files, that they change immediately, when the user changes the language. I have a toggleButtonBar in my app and want the labels of the buttons to change as well. Therefore I use the BindableObjectClass, which extends Object and has a bindable property label. I use it like that: mx:ToggleButtonBar mx:ArrayCollection components:BindableObject label={resourceManager.getString(MY_BUNDLE, 'NAME_1')}/ components:BindableObject label={resourceManager.getString(MY_BUNDLE, 'NAME_2')}/ /mx:ArrayCollection /mx:ToggleButtonBar The only problem I have is, that when I change the language, the ToggleButtonBar disappears for a moment. It appears with the correct language labels, when all other labels change language. I want the ToggleButtonBar to remain on stage and just change the language. Does anybody know another way to do it, that prevents the disappearing? Thanks in advance, Christoph
[flexcoders] ToggleButtonBar issue - LabelPlacements and icon use
Hi all, I have a skinned toggleButtonBar and want to apply an icon when a button has been selected. I need this icon to sit below the text, and have tried using the labelPosition:top property, but that doesn't seem to sort it. Any ideas? Much appreciated, Gareth
[flexcoders] ToggleButtonBar - bug or misuse?
Hello, I have a toggle ToggleButtonBar that might end up having an empty dataProvider (no buttons) during the course of the execution. This causes a runtime error in the hiliteSelectedNavItem function when it tries to get the button at index 0 when there isn't one. I was able to fix the problem by patching the function as follows: from: ... if( index -1 ) { ... to: ... if (index -1 index numChildren) ... My question is whether or not a bug, or just a misuse of the component. Is the ToggleButtonBar designed to always have at least one button? If not, should I file a bug report and a possible fix? I'm pretty new to open source projects, so I'm not to sure what the process is. Thanks for any input! ~Aaron
Re: [flexcoders] ToggleButtonBar
On Monday 17 Sep 2007, [EMAIL PROTECTED] wrote: Is there any way to deselect all the buttons in a ToggleButtonBar? Specifically, what I would like to do when I set the dataprovider for a ToggleButtonBar, is to just display the buttons and not have the first one selected? public class UnselectedToggleButtonBar extends ToggleButtonBar{ public function UnselectedToggleButtonBar(){ super(); callLater(unselect); } private function unselect():void{ var n:int = numChildren; for (var i:int = 0; i n; i++) { var child:Button = Button(getChildAt(i)); child.selected = false; child.getTextField().styleName = child; } } } -- Tom Chiverton Helping to advantageously improve unique channels on: http://thefalken.livejournal.com This email is sent for and on behalf of Halliwells LLP. Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at St James's Court Brown Street Manchester M2 2JF. A list of members is available for inspection at the registered office. Any reference to a partner in relation to Halliwells LLP means a member of Halliwells LLP. Regulated by the Law Society. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged. If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents. If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 8008. For more information about Halliwells LLP visit www.halliwells.com. -- 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 * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * Your email settings: Individual Email | Traditional * To change settings online go to: http://groups.yahoo.com/group/flexcoders/join (Yahoo! ID required) * To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
Re: SPAM-LOW: [flexcoders] ToggleButtonBar
Just a thought, but why not create a custom style where the active button is the same as the inactive button? superabe superabe wrote: Is there any way to deselect all the buttons in a ToggleButtonBar? Specifically, what I would like to do when I set the dataprovider for a ToggleButtonBar, is to just display the buttons and not have the first one selected? TIA, superabe -- Jeffry Houser, Technical Entrepreneur, Software Developer, Author, Recording Engineer AIM: Reboog711 | Phone: 1-203-379-0773 -- My Company: http://www.dot-com-it.com My Podcast: http://www.theflexshow.com My Blog: http://www.jeffryhouser.com
Re: [flexcoders] ToggleButtonBar
Thanks for that. (was hoping we would not have to resort to callLaters. What happens if we reset the dataProvider.? I guess I'll try it out and see) This is one of the few times, I get both irritated and happy with the the framework. ... irritated that such a simple/common use case does not have a convenient api built for it. ... happy that we are able to extend it to suit our needs. - superabe On 9/17/07, Tom Chiverton [EMAIL PROTECTED] wrote: On Monday 17 Sep 2007, [EMAIL PROTECTED] wrote: Is there any way to deselect all the buttons in a ToggleButtonBar? Specifically, what I would like to do when I set the dataprovider for a ToggleButtonBar, is to just display the buttons and not have the first one selected? public class UnselectedToggleButtonBar extends ToggleButtonBar{ public function UnselectedToggleButtonBar(){ super(); callLater(unselect); } private function unselect():void{ var n:int = numChildren; for (var i:int = 0; i n; i++) { var child:Button = Button(getChildAt(i)); child.selected = false; child.getTextField().styleName = child; } } } -- Tom Chiverton Helping to advantageously improve unique channels on: http://thefalken.livejournal.com This email is sent for and on behalf of Halliwells LLP. Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at St James's Court Brown Street Manchester M2 2JF. A list of members is available for inspection at the registered office. Any reference to a partner in relation to Halliwells LLP means a member of Halliwells LLP. Regulated by the Law Society. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged. If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents. If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 8008. For more information about Halliwells LLP visit www.halliwells.com. -- 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
[flexcoders] ToggleButtonBar
Is there any way to deselect all the buttons in a ToggleButtonBar? Specifically, what I would like to do when I set the dataprovider for a ToggleButtonBar, is to just display the buttons and not have the first one selected? TIA, superabe
[flexcoders] ToggleButtonBar
Hi All: I have a ToggleButtonBar with 8 buttons. I am trying to get the corners of the Bottom Left of the first button Bottom Right of the last button to NOT be rounded. I have tried focusRoundedCorners=tl tr in the MXML code and focusRoundedCorners=tl in the firstButtonStyleName and focusRoundedCorners=tr in the lastButtonStyleName. Nothing works. What am I missing? Or is this bug? Any help will be greatly appreciated. Thanks, Jack
[flexcoders] togglebuttonbar and styles
Greetings, I have a toggle button bar where some buttons need to be styled one way, and the rest styled another (ie, first 4 in a bar of 10 must have a blue background, while the rest should be yellow). The problem is, even though these styles are getting applied to the button (I've verified this through tracing and debugging), the damn things won't actually render until a different component in the app is clicked. For example: Upon first load of the screen, it'll look like this: http://i4.photobucket.com/albums/y140/svyeta/before.gif http://i4.photobucket.com/albums/y140/svyeta/before.gif Then when the answer is selected elsewhere on the page (thus incrementing the position), it'll do this: http://i4.photobucket.com/albums/y140/svyeta/after.gif http://i4.photobucket.com/albums/y140/svyeta/after.gif How can I force these styles to render properly? It's driving me mad! Cheers, Michelle
[flexcoders] ToggleButtonBar: Styling Individual Button
Hi all, I looked through the docs and did a couple of Googles but couldn't find anything on this. Is it possible to style each individual button in a ToggleButtonBar? For example, assigning a different background color to each one? Thanks -Kenny -- 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 * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
RE: [flexcoders] ToggleButtonBar: Styling Individual Button
Kenny, ButtonBar (ToggleButtonBars parent class) has three styles that control the first/last and all button styles: buttonStyleNamefirstButtonStyleNamelastButtonStyleName If you need more fine grained control than this, then youll have to iterate through each child of the ToggleBB and call setStyle on each. Jason From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of lostinrecursion Sent: Monday, August 28, 2006 1:25 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] ToggleButtonBar: Styling Individual Button Hi all, I looked through the docs and did a couple of Googles but couldn't find anything on this. Is it possible to style each individual button in a ToggleButtonBar? For example, assigning a different background color to each one? Thanks -Kenny __._,_.___ -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com SPONSORED LINKS Software development tool Software development Software development services Home design software Software development company 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. __,_._,___
[flexcoders] ToggleButtonBar deselect
Is there any way to programmatically deselect a button on the ToggleButtonBar - to start out, say, with no button selected? - Tom -- 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 * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[flexcoders] togglebuttonbar/buttonbar : embedding icons issue
Hello all. Seems that the only way that I've been able to accomplish embedding icons in a togglebuttonbar/buttonbar control is by doing the following: mx:ToggleButtonBar id=tbb iconField=icon width=300 textAlign=left direction=vertical mx:Array mx:Object label=Flash icon=@Embed('/assets/picture.png')/ mx:Object label=Director icon=@Embed('/assets/picture.png')/ /mx:Array /mx:ToggleButtonBar In the above example, we specify the dataprovider as an Array in the mxml tags. Now if we try doing this in combination with actionscript: mx:Script ![CDATA[ private function dostuff() : void { var arritems : Array = new Array(); var item : Object = new Object(); item.label = Flash; item.icon = @Embed('/assets/picture.png'); arritems.push( item ); item = new Object(); item.label = Director; item.icon = Embed('/assets/picture.png'); arritems.push( item ); tbb.dataProvider = arritems; } ]] /mx:Script mx:ToggleButtonBar id=tbb iconField=icon labelField=label width=300 creationComplete=dostuff() textAlign=left direction=vertical/ The icon dissappears. I'm wondering why there isn't an iconFuction tag in the togglebuttonbar/buttonbar components. I've tried doing several variations on the dataprovider and script and have not been able to embed the icon with exception to how I've shown at the begginning of this post. Is this a bug or is there a way to accomplish this in the method that I'm attempting? Thanks folks :) Yahoo! Groups Sponsor ~-- Great things are happening at Yahoo! Groups. See the new email design. http://us.click.yahoo.com/TISQkA/hOaOAA/yQLSAA/nhFolB/TM ~- -- 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 * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/