Diese Seite mit anderen teilen ...

Informationen zum Thema:
WinDev Forum
Beiträge im Thema:
Erster Beitrag:
vor 5 Jahren, 9 Monaten
Letzter Beitrag:
vor 5 Jahren, 9 Monaten
Beteiligte Autoren:
Arie, Alan Evans, Al, Ian

Selected Row Colour - List Box - WM17 - Android

Startbeitrag von Alan Evans am 07.11.2012 16:24


This should be a really easy one, but I'll be damned if I can get it working ! How do i just set the row colour of a selected item (in the Row_Selected Event) in a list box on Android? If I try and set either the brushcolor or the color, nothing happens!

many thanks



Just a thought (haven't tried it) but can't you set the selected row colour from the IDE : Style tab, Selected Row (Element dropdown) then select Bckgrd Color.

Or do you specifically need to do this programatically at RunTime ?

At Run Time (In WinDev) :

lstMyListBox [ lstMyListBox..Value]..BrushColor = myDesiredColour (say, LightRed)

You'll have to remember to cycle through all of the list box items each time to reset any previously selected row colour to its 'normal' colour...



von Ian - am 07.11.2012 17:14
From memory: I couldn't make this work either and hadn;t much time.
I ended up adding a static control behind the other controls in a row. And change the color of this static control instead of the looper row.

von Arie - am 07.11.2012 21:16
Mmh, I see now you are talking about a listbox. Not the looper?

von Arie - am 07.11.2012 21:17
Hello Alan

I use gPen() in list boxes in Windev - maybe it also works on Android.


von Al - am 08.11.2012 00:38
Thanks to all for suggestions. I got Ian's idea working on one listbox, but on another one it failed, bizarre! Same code, just different plane, started to complain about zero subscript. So I just set a Label control instead. After several incantations of Windev, I've sorta got used to the fact that about 75% of it actually works as it should !



von Alan Evans - am 13.11.2012 12:16
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.