1 person found this helpful
"ScriptUI for Dummies" from Peter Kahrel provides helpful snippets on customizing listbox and/or dropdownlist:
"Type-ahead lists: select while you type" (p. 26)
"Selecting items in dropdowns using the keyboard" (p. 54)
Thanks, Marc! I reviewed the sections of Peter's guide that you suggested and it gave me some great ideas.
So, my initial plan is to use an edittext control and a dropdownlist control, in stack orientation in the same container, with the edittext containter being the same width as the dropdown list, minus the width of the dropdownlist's arrow button. It would need a function to transfer the item that is selected in the dropdownlist to the edittext control if the user chooses a list item instead of typing something of their own in the edittext control.
I'm not sure if this will work, as I have virtually zero experience with ScriptUI, but it'll be fun trying!
This is definitely going to work, but there's a problem: on Windows, if you stack two objects, then the object that's dawn last is shown, but on Macs, the object drawn first is drawn. You can control for this using if (File.fs == "Macintosh").If you get stuck, I've got a working example to show how it works.
Peter, thanks for the warning about Windows vs. Mac! Cross compatibility issues are my biggest concern.
If I'm following you correctly, your workaround would go something like this:
if(File.fs = "Macintosh")
Thanks for your help!!
> the workaround would go something like this:
I'm writing my scripts on a Windows XP Pro (32-bit) machine, and here is the result of the hybrid edittext/dropdownlist experiment I tried (thanks, again, Peter and Marc for your help!):
And here is what a normal dropdownlist looks like in CS5 on my Windows machine. Can anyone who does their work on a Mac tell me if dropdownlists on a Mac look the same?