This content has been marked as final. Show 3 replies
Atul Saxena wrote:
> I have a small problem. I have a drop down. I want to change the labels and
> textboxes associated with it based on the item selected in the drop down...
I assume you have a drop down menu correct? Do you want text that's displayed in
another sprite to change when you select an item in the drop down menu?
You'd need to give more info on how you're setting up your application so people
who respond can give you information more suited to what you actually want to
For now, I'll suggest looking at menu Xtras. They're generally easy to use and
quick to set up. One that I use which I'd recommend is the SarMenu Xtra:
There many other menu Xtras available.
Director Lecturer / Consultant
I have drop down which is basically a bit map and i have attached a combo box beheviour to it. So now when i select a perticular item from the combobox(drop down) then the different member like label and Text fields shoud get changed.
For example if I have these item in the drop down (Item 1, Item 2). Now when i select "Item 1" the lablels and the associated text field member should be displayed on the stage i.e. if Item 1 is selected then I should get a First name Label and a First name textbox. Also
if i select "Item 2" then the label should change to Full Name and a text box member which will hold the value of the Full Name.
Also tell if it is possible without using of any xtra.
I hope that make sense...
It is all possible without an Xtra, but it is hard to give you any specific feedback without some idea of what 'combo box behaviour ' are you using.... but basically, you want to write a handler like this:
on ComboboxItemChanged (selectedPos)
-- determine the label text based on which item selected
LabelText = ListOfLabels.getAt(SelectPos)
-- determine the display text based on which item selected
displaytext = ListOfText.getAt(SelectPos)
-- set the cast member texts
member("label").text = LabelText
member("Textbox").text = displaytext
-- go to the frame displaying them?
go to "SomeMarker"
Incidentally, if you do decide to use an Xtra - check out OS Controls from openspark.com. The are cross-platform