[flexcoders] Combo box selectedlabel problem.
Hi all I want to set the initial value of a combo box to the first item when the application loads and load another component according to the item selected. The functionality works when I use a change action in the combo box.That is it works when I manually change the item of the combobox. But it is not working when the application is loading. That is the event is not listening when the application loads. Examples I have say 5 items select Code,1,2,3,4. So the default vaue will be select code.A alue for 1 will show an apple image in another a componentand so on. When I manually change to the value 2 the image changes and when I change to 1 the image is changed to apple. I want the application to start with the initial value of the combo box set to 1. So that the initial image will be apple.Though the combo box is set to 1 there is no image shown. Only when I do it manually it shows up. Can any one help on this regard. Thanks in Advance Hara
Re: [flexcoders] Combo box selectedlabel problem.
Hello, Try to dispatch event from your combo manually, like myCombo.dispatchEvent( new Event( Event.CHANGE ) ); haravallabhan wrote: Hi all I want to set the initial value of a combo box to the first item when the application loads and load another component according to the item selected. The functionality works when I use a change action in the combo box.That is it works when I manually change the item of the combobox. But it is not working when the application is loading. That is the event is not listening when the application loads. Examples I have say 5 items select Code,1,2,3,4. So the default vaue will be select code.A alue for 1 will show an apple image in another a componentand so on. When I manually change to the value 2 the image changes and when I change to 1 the image is changed to apple. I want the application to start with the initial value of the combo box set to 1. So that the initial image will be apple.Though the combo box is set to 1 there is no image shown. Only when I do it manually it shows up. Can any one help on this regard. Thanks in Advance Hara -- Feсi quod potui, faciant meliora potentes
RE: [flexcoders] Combo box selectedlabel problem.
The valueCommit event fires when the control is changed programmatically. Docs sa also on user interaction, but I'd verify this first. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Dmitry Kochetov Sent: Wednesday, December 06, 2006 6:24 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Combo box selectedlabel problem. Hello, Try to dispatch event from your combo manually, like myCombo.dispatchEvent( new Event( Event.CHANGE ) ); haravallabhan wrote: Hi all I want to set the initial value of a combo box to the first item when the application loads and load another component according to the item selected. The functionality works when I use a change action in the combo box.That is it works when I manually change the item of the combobox. But it is not working when the application is loading. That is the event is not listening when the application loads. Examples I have say 5 items select Code,1,2,3,4. So the default vaue will be select code.A alue for 1 will show an apple image in another a componentand so on. When I manually change to the value 2 the image changes and when I change to 1 the image is changed to apple. I want the application to start with the initial value of the combo box set to 1. So that the initial image will be apple.Though the combo box is set to 1 there is no image shown. Only when I do it manually it shows up. Can any one help on this regard. Thanks in Advance Hara -- Feсi quod potui, faciant meliora potentes