PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV Mobile 24 → WM 24 List Box Control not deselecting
WM 24 List Box Control not deselecting
Débuté par Claire, 02 juil. 2019 16:40 - 8 réponses
Membre enregistré
27 messages
Posté le 02 juillet 2019 - 16:40
We have 2 list boxes in our app - we just upgraded from version 22 to 24 and I noticed that the list boxes, when you tap on the different headers in the list, the blue color to indicate the item selected does not disappear when another item is selected. The list box ends up becoming all blue as you continue down the list.

Screen shot is below:


Membre enregistré
409 messages
Posté le 06 juillet 2019 - 17:29
Hi Claire

How do you set up the combo box?
via Query or Table? or Do you put the info by code?

For me I recommend you to do it from code.
I don't have WM 24 but try it that way.
Also See if for somereason on the description of the combo box did you activated multiselection for somereason who knows.

Good Luck!

--
Best Regards
ARV
Membre enregistré
27 messages
Posté le 08 juillet 2019 - 19:58
ARV wrote:
Hi Claire

How do you set up the combo box?
via Query or Table? or Do you put the info by code?

For me I recommend you to do it from code.
I don't have WM 24 but try it that way.
Also See if for somereason on the description of the combo box did you activated multiselection for somereason who knows.

Good Luck!

--
Best Regards
ARV


Hi ARV,

Thanks so much for the response. The combo box is populated by code and an external CSV with the actual information.

STC_Title = "Fact Sheet"

HReadSeekFirst(EXPRESS_misin_factsheet_animals,id,gnSelectedID)
IF HFound(EXPRESS_misin_factsheet_animals) = False THEN
Error("Species not found")
RETURN
ELSE
STC_CnName = EXPRESS_misin_factsheet_animals.cname
STC_ScName = StringBuild("%1 %2", EXPRESS_misin_factsheet_animals.genus, EXPRESS_misin_factsheet_animals.species)
LIST_Animals = 1
STC_Description = EXPRESS_misin_factsheet_animals.description
MyImage is Image
MyImage = dLoadImage(gsExtractDir + "Images/" + StringBuild("%1_%2_sm.jpg", EXPRESS_misin_factsheet_animals.genus, NoCharacter(EXPRESS_misin_factsheet_animals.species,CR)))
IMG_SMALL = MyImage
END


"Selecting a row of LIST_Animals"
SWITCH LIST_Animals
CASE 1: STC_Description = EXPRESS_misin_factsheet_animals.description
CASE 2: STC_Description = EXPRESS_misin_factsheet_animals.habitat
CASE 3: STC_Description = EXPRESS_misin_factsheet_animals.hdetail
CASE 4: STC_Description = EXPRESS_misin_factsheet_animals.damage
CASE 5: STC_Description = EXPRESS_misin_factsheet_animals.similar
CASE 6: STC_Description = EXPRESS_misin_factsheet_animals.reproduction
CASE 7: STC_Description = EXPRESS_misin_factsheet_animals.edrr
CASE 8: STC_Description = EXPRESS_misin_factsheet_animals.source
OTHER CASE: STC_Description = ""
END


The code has not changed in a year (we were a little behind and still running 22 up until last week) so I was a bit surprised at this new activity. It looks like the selection mode is set to "Single Selection" with a check next to "Android/iOS selection mode"
Membre enregistré
409 messages
Posté le 08 juillet 2019 - 22:49
Hi Claire

Wow that's really weird.
Because with that selectin mode it will not select more than 1.

also my bad you are talking about "List Box" not "Combo Box"

I never use List box before but I don't think they are really that different.

The usually use the functiont ListAdd functiont to add information on this items.

I really don't see any problem about why it's like multiselection for some reason...

It should work that you select one row and then the selection disappear.

--
Best Regards
ARV
Membre enregistré
27 messages
Posté le 09 juillet 2019 - 14:15
ARV wrote:
Hi Claire

Wow that's really weird.
Because with that selectin mode it will not select more than 1.

also my bad you are talking about "List Box" not "Combo Box"

I never use List box before but I don't think they are really that different.

The usually use the functiont ListAdd functiont to add information on this items.

I really don't see any problem about why it's like multiselection for some reason...

It should work that you select one row and then the selection disappear.

--
Best Regards
ARV


Hi ARV,

My apologies, that was a typo! =) That should have said list box and not combo box...

Thanks for the assistance..I thought it was pretty weird that it just started doing this - guess I will take another look at it and see if there is anything that can be done.

Thanks again!
Membre enregistré
409 messages
Posté le 09 juillet 2019 - 15:19
Hi Claire

Hope you solve this soon but somethings bother me.

STC_Title = "Fact Sheet"

HReadSeekFirst(EXPRESS_misin_factsheet_animals,id,gnSelectedID)
IF HFound(EXPRESS_misin_factsheet_animals) = False THEN
Error("Species not found")
RETURN
ELSE
STC_CnName = EXPRESS_misin_factsheet_animals.cname
STC_ScName = StringBuild("%1 %2", EXPRESS_misin_factsheet_animals.genus, EXPRESS_misin_factsheet_animals.species)
LIST_Animals = 1
STC_Description = EXPRESS_misin_factsheet_animals.description
MyImage is Image
MyImage = dLoadImage(gsExtractDir + "Images/" + StringBuild("%1_%2_sm.jpg", EXPRESS_misin_factsheet_animals.genus, NoCharacter(EXPRESS_misin_factsheet_animals.species,CR)))
IMG_SMALL = MyImage
END


where on this code do you add the info on your list box? I can't see it.

I test on an Android device a simple way to add info on my List box using ListAdd and it's select one row and then the selection disappear.

Can you tell me where did you add info?

Good Luck!

--
Best Regards
ARV
Membre enregistré
27 messages
Posté le 09 juillet 2019 - 16:59
ARV wrote:
Hi Claire

Hope you solve this soon but somethings bother me.

STC_Title = "Fact Sheet"

HReadSeekFirst(EXPRESS_misin_factsheet_animals,id,gnSelectedID)
IF HFound(EXPRESS_misin_factsheet_animals) = False THEN
Error("Species not found")
RETURN
ELSE
STC_CnName = EXPRESS_misin_factsheet_animals.cname
STC_ScName = StringBuild("%1 %2", EXPRESS_misin_factsheet_animals.genus, EXPRESS_misin_factsheet_animals.species)
LIST_Animals = 1
STC_Description = EXPRESS_misin_factsheet_animals.description
MyImage is Image
MyImage = dLoadImage(gsExtractDir + "Images/" + StringBuild("%1_%2_sm.jpg", EXPRESS_misin_factsheet_animals.genus, NoCharacter(EXPRESS_misin_factsheet_animals.species,CR)))
IMG_SMALL = MyImage
END


where on this code do you add the info on your list box? I can't see it.

I test on an Android device a simple way to add info on my List box using ListAdd and it's select one row and then the selection disappear.

Can you tell me where did you add info?

Good Luck!

--
Best Regards
ARV


Hi ARV,

Below is a screenshot of where the list options are. This app was developed prior to my involvement so I have just been maintaining it since the developer left.




Membre enregistré
409 messages
Posté le 09 juillet 2019 - 18:17
Hi Claire

I test it on a project in blank with a ListBox, adding like you do on your description, but for me it's working fine. the selection appear an then dissapear because of the check of Android and iOS.

I suggest to creat a new window put a test listbox and see wha happend if it works see what's different from each other.

Your issue it's really rare and I can't tell what's happening, maybe some code it's bother you who knows.

But I only can recommend you this, create another list box from zero and study what it's happening.

Good Luck!

--
Best Regards
ARV
Membre enregistré
409 messages
Posté le 09 juillet 2019 - 18:46
Hi

another thing I want to make clear

are you compile the project for Android or iOS?

--
Best Regards
ARV
Membre enregistré
27 messages
Posté le 10 juillet 2019 - 14:07
Hi ARV,

Thank you for your input. I will look into creating a new one to see if that solves the issue.

Right now this issue is only occurring on iOS.
Membre enregistré
409 messages
Posté le 10 juillet 2019 - 22:07
Hi Claire

you are totally RIGTH!!!

I test it on my iPhone specially iPhone SE iOS 12.3.1 and it doesn't work at all.

for this I really recommend if it's possible to change it to a Combo Box it will be more useful. and also you will win more space on the window.
I test it again on an Android and just works fine better than iOS.

What can I tell it's like on iOS this function of the selection of List box doesn't go well on iOS but Android works just great.

Even PCSoft doesn't allow to set it on description of the ListBox (it's on grey) and on the other hand Android doesn't appear with the grey color.

Hope this could help you in some way

Good Luck!

--
Best Regards
ARV
Message modifié, 10 juillet 2019 - 22:08