python748 / alternate-java-bridge-library

Automatically exported from code.google.com/p/alternate-java-bridge-library
Apache License 2.0
0 stars 0 forks source link

Prompt for DropDown component not displaying #47

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create a DropDown component in the GLE and in your code
2. Add items to the DropDown component each time the app starts
3. Set a prompt for the DropDown in the GLE

What is the expected output? What do you see instead?
I expect to the see the prompt I set in the GLE, instead I see the first item 
in the dropdown component list as the displayed prompt.

What version of the product are you using? On what operating system?
2.2.32
Win764 bit

Please provide any additional information below.

Original issue reported on code.google.com by bric...@gmail.com on 11 May 2012 at 1:14

GoogleCodeExporter commented 8 years ago
What are you talking about prompt? I'm confused by what you mean.

Original comment by IMPINC...@gmail.com on 11 May 2012 at 2:24

GoogleCodeExporter commented 8 years ago
Prompt as in the text that is first displayed on the dropdown before something 
is chosen.  after it is chosen, i tell it to set text (sorry should have said 
text instead of prompt) to the choice the user made.

before they choose anything though, it should be using what i have chosen in 
the GLE to be the text something like "please pick a choice" should show.  
Instead, if the choices are (choice 1, choice 2, choice 3, choice 4), it 
dispalys "choice 1"

Original comment by bric...@gmail.com on 11 May 2012 at 2:37

GoogleCodeExporter commented 8 years ago
Ok, after looking in the class, I just never noticed the prompt thing. I'll add 
a method in the next version. For now, you can use 
dropdown.getView().setPrompt("This is my prompt");

Original comment by IMPINC...@gmail.com on 11 May 2012 at 2:52

GoogleCodeExporter commented 8 years ago
Sorry, you have to cast it, this is the correct line:
((Spinner)dd.getView()).setPrompt("The prompt");

Original comment by IMPINC...@gmail.com on 11 May 2012 at 3:01

GoogleCodeExporter commented 8 years ago
So first I want to say Thank you, as I did not notice the Prompt either...that 
is not however what I originally was reporting.  I should have included 
pictures (which I will from now on).  Please see screenshots

Original comment by bric...@gmail.com on 12 May 2012 at 2:47

Attachments:

GoogleCodeExporter commented 8 years ago
That's been there the whole time. Use setSelection(String element) to set the 
default selection.

Original comment by IMPINC...@gmail.com on 22 May 2012 at 7:07

GoogleCodeExporter commented 8 years ago

Original comment by IMPINC...@gmail.com on 22 May 2012 at 7:22