|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
Combobox Dropdown Strange Behavior
OK two things. First, when I load up a combobox into an mc 95 px tall and run it, it shows the choices up instead of down, and I can't see all of the choices. Is this normal?
Second, when I run it, nothing is selected. What did I do wrong? I expected "Helpdesk" to be selected. I'm passing the variables like this: menu.swf?mysections=1,2,4,8,32,M§texts=HelpDesk,Projects,Telecommunication,Web,Purchasing,My Tickets&thissect=1 and loading the combobox like this in the frame's action: Code:
sects = this.mysections.split(",");
texts = this.secttexts.split(",");
for (i=0; i < sects.length; i++) {
cboSections.addItem(texts[i],sects[i]);
if (cboSections.getValue() == _root.thissect) {
setidx = cboSections.getSelectedIndex();
}
}
cboSections.sortItemsBy("label", "ASC");
cboSections.setSelectedIndex(setidx);
stop();
TIA
__________________
Thanks, CF |
|
#2
|
|||
|
|||
|
when you run the line setidx = cboSections.getSelectedIndex(), the combobox doesn't have a selected index - change to:
Code:
if (cboSections.getValue() == _root.thissect) {
setidx = i;
}
|
|
#3
|
||||
|
||||
|
Good try, jamieB, but the dropdown still defaults to nothing selected.
I did figure out why the box is dropping up... it seems that the default of eight rows is higher than the stage, so it only shows what it can without letting me scroll through the rest. So, I fixed it by only showing four rows, but is there a way to get the combobox to drop down below the bottom of the mc during runtime? BTW, I am loading the dropdown in the action of the frame its in. When I move back and forth between the frames, the drop down is reset. In other words, if I make a selection, leave the frame and come back to it, the dropdown has nothing selected. Is that normal, or did I do something wrong? Thx everyone... |
![]() |
| Viewing: Dev Shed Forums > Web Design > Flash Help > Combobox Dropdown Strange Behavior |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|