I just discovered why the second ComboBox was not affected -- it's because I was disabling the ** Form item ** that wraps the ComboBox and not the ComboBox itself.
I changed my code so that I enable and disable both ComboBoxes by setting the enabled property for the Form item rather than for the ComboBox and now the problem with the selectable text is gone (you can even set the enabled property for the Form item to false in the MXML without causing a problem). One possible drawback that I found in doing this is that the Form item's label text is dimmed when the Form item is disabled (disabling only the ComboBox left the Form item's label untouched). Still, it's better than the alternative of selectable text in the ComboBox. Paul --- In flexcoders@yahoogroups.com, "Paul Whitelock" <[EMAIL PROTECTED]> wrote: > > Thanks Ben, that helped a bit. > > I have two ComboBoxes on the Form and each had an enabled="false" in > the MXML. However, when I removed the enabled="false" from the MXML I > was still getting the i-beam and selectable text. > > In my code I'm also programatically changing the enabled state of the > ComboBoxes, so I tried removing the code where the ComboBoxes are > disabled in response to other settings in the form. This time it > worked: the i-beam cursor was gone and the text was no longer > selectable. Of course the ComboBoxes are always enabled now, which is bad. > > I did discover something else odd. With the enabled="false" gone in > the MXML I can programatically enable and disable the SECOND ComboBox > without it becoming selectable (the first ComboBox still has the > problem when it is programatically disabled and enabled). > > Anyone know of a way to disabling/enabling a ComboBox without running > into this problem of the text becoming selectable? > > Paul > > --- In flexcoders@yahoogroups.com, "ben.clinkinbeard" > <ben.clinkinbeard@> wrote: > > > > I actually discovered this same issue in my app a few days ago. I also > > have several other ComboBoxes (including one right next to the > > problematic one) that don't display the i-beam. > > > > After a bit of investigation, it seems that having enabled="false" in > > the ComboBox's MXML tag (then enabling it at some point of course) > > causes the selectable text. Any idea on a workaround? > > > > Thanks, > > Ben > > > > > > > > --- In flexcoders@yahoogroups.com, "Paul Whitelock" <news@> wrote: > > > > > > I've got a ComboBox in a Form and for some reason the text is > > > selectable (i.e., the I-bar cursor is displayed when you move over the > > > ComboBox and you can drag-select the text displayed for the currently > > > selected list item). The "editable" property is not defined, and it > > > doesn't make a difference if "editable" is explicitly set to false > > > (note that it is not possible to type text into the ComboBox, just > > > select the text that is there). There's no "selectable" property for a > > > ComboBox, so I can't use that to disable text selection. > > > > > > I have ComboBoxes in other Forms that don't have this problem and I > > > don't see any differences between this ComboBox and the others in my > > > code. Any ideas on what I can do to make the ComboBox text > > > non-selectable? Thanks! > > > > > > Paul > > > > > >