[Xerte] Combobox thing
Julian Tenney
Julian.Tenney at nottingham.ac.uk
Tue Nov 30 16:13:03 GMT 2010
Make the array yourself and set null as the first item?
Here's the dode from the engine:
cbo = this.attachMovie("FComboBoxSymbol", "cbo"+this.levels, this.levels);
this["cbo"+this.levels]._x = x;
this["cbo"+this.levels]._y = y;
if (w != undefined) {
cbo.setSize(w, h);
}
cbo.index = this.pages.length;
//set up items...
if (items.indexOf('{') == 0) {
var cboItems = expression(items.substr(1, items.length-2), engine).split('~');
} else {
var cboItems = items.split('~');
}
//set up data...
if (data != undefined) {
if (data.indexOf('{') == 0) {
var dataItems = expression(data.substr(1, data.length-2), engine).split('~');
} else {
var dataItems = data.split('~');
}
}
for (var i = 0; i<cboItems.length; i++) {
cbo.addItem(cboItems[i], dataItems[i]);
}
cbo.setStyleProperty("background", STYLES.statusBarColour);
cbo.setStyleProperty("selection", STYLES.titleBarColour);
cbo.setStyleProperty("textColor", STYLES.textUnselected);
cbo.setStyleProperty("textSelected", STYLES.textSelected);
cbo.setChangeHandler("onComboChange");
cbo.getItem = function() {
return this.getSelectedItem().label;
};
cbo.getData = function() {
return this.getSelectedItem().data;
};
cbo.tabIndex = getTabIndex();
cbo.onSetFocus = function() {
speak("Options. "+this.getSelectedItem().label+" selected. Use the arrow keys to select");
};
cbo._accProps = new Object();
cbo._accProps.name = "combobox";
Accessibility.updateProperties();
this.responses.push(cbo);
return cbo;
From: xerte-bounces at lists.nottingham.ac.uk [mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Dave Burnett
Sent: 30 November 2010 16:11
To: Xerte list
Subject: [Xerte] Combobox thing
Any way to set the default entry to '' ?
Say we have these items:
New York~Moscow~Tokyo~London
New York appears in the default position, as well as the first dropdown list item.
Can I get a blank box initially?
I tried dropdownrs.topLabel.label = '';
But that blanks the New York in the first list position as well.
Dave
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.nottingham.ac.uk/pipermail/xerte/attachments/20101130/d4a0618e/attachment.html
More information about the Xerte
mailing list