|
| Resetting a Combo Box in Android |
| Iniciado por guest, 13,jul. 2016 11:55 - 10 respuestas |
| |
| | | |
|
| |
| Publicado el 13,julio 2016 - 11:55 |
Hi,
I'm trying to reset a combo box. My attempt was just setting the value of the combo box to null. The Code: Combo_Qry_Test = Null In the simulator it all works fine, but on my device it keeps the last selected value. Any ideas how to solve this?
kind regards Patrick |
| |
| |
| | | |
|
| | |
| |
| Publicado el 13,julio 2016 - 12:18 |
| |
| |
| | | |
|
| | |
| |
| Publicado el 13,julio 2016 - 13:10 |
I just want that there is no item selected anymore and the combo box returns null as value. Deleting all items is not my purpose.
regards Patrick |
| |
| |
| | | |
|
| | |
| |
| Publicado el 13,julio 2016 - 13:52 |
Hi Patrick,
AFAIK, a combobox with nothing elected in it returns -1, not null
Furthermore, to unselect everything in it, you can use listselectminus
Best regards |
| |
| |
| | | |
|
| | |
| |
| Publicado el 13,julio 2016 - 14:33 |
the funny thing, listselectminus change nothing in my combo box. So still no working solution.
regards Patrick |
| |
| |
| | | |
|
| | |
| |
| Publicado el 13,julio 2016 - 15:07 |
Hi,
Ok, I see. Just an idea; I use the combo box properties dialog to define the first item in the list as <'None'> with a return value of 0. |
| |
| |
| | | |
|
| | |
| |
| Publicado el 13,julio 2016 - 23:12 |
Hi Patrick,
Quote Patrick Schwarz
the funny thing, listselectminus change nothing in my combo box. So still no working solution.
regards
Patrick
Well it does work in my code (on listboxes, I do not use combos), so maybe you should show us your code so that we can find a mistake in it?
Best regards |
| |
| |
| | | |
|
| | |
| |
| Publicado el 14,julio 2016 - 11:40 |
@ Darren: Defining a custom row is greyed, so not availalable for my platform.
@ Fabrice: I fill the combo box with data from my databases. I use it to define characteristics of a filter for a sql-query. By clicking on a button i want to set the filter to default. ListSelectMinus(COMBO_QRY_Test) HExecuteQuery(...) Looper Display(...) Best regards Patrick |
| |
| |
| | | |
|
| | |
| |
| Publicado el 14,julio 2016 - 13:53 |
Hi again
did you try doing a multitask just after the listselectminus, so that the OS can do the unselect?
And how do you get the value of combo line for your query?
Best regards |
| |
| |
| | | |
|
| | |
| |
| Publicado el 15,julio 2016 - 16:15 |
Hm i tried it with multiselect but no changes.
I thought about adding a new item with ListAdd and this to return 0, so to solve the problem otherwise. But when i select the new row, it just returns 1.
ListAdd(COMBO_QRY_Test, "Test Row" + gLink ("0")) gLinkActivate(COMBO_QRY_Test, True) |
| |
| |
| | | |
|
| | |
| |
| Publicado el 15,julio 2016 - 17:00 |
Hi Patrick,
It looks like even though the Help says that glink is available in Android, that specifically glink = "0" doesn't work as expected on Android. In one of your previous replies you say that the "1st row" (custom) definition is grayed out in the properties dialog 
It looks as though Android returns the subscript irrespective of what glink is set to. Wonder what happens if you set all the glink values to "1" - does it still return 1,2,3 etc ? |
| |
| |
| | | |
|
| | | | |
| | |
|