Erel's CustonListView list... It's working great and I've got it doing some pretty neat stuff.
I'm producing 3 lists in a tab host... most of them have the text, and a ToggleButton. Those are all working fine.
In two more, I have the text, a small colored panel showing an already chosen color, and a button. When you click the button, you get the color picker, which stores the new color in a multi-dimensional array, and then gets saved in the database.
I want to change the color of the small panel's background, but can't seem to do it. It does it fine when it's being assigned during list creation, and that works. I Dim'd the two panels in the global section so I can access them, but that doesn't work either... The color's being stored correctly, but I can't seem to get that panel to change on the fly. Now, I know it's contained in a panel, but I would assume that since it's been declared globally, I should still be able to access it directly.
This works when they're being created:
For the button click inside the list , which works but doesn't set the panel color (but it does, correctly, enter the proper value in the array):
Why can't I set pnl2.Color like this???
I'm producing 3 lists in a tab host... most of them have the text, and a ToggleButton. Those are all working fine.
In two more, I have the text, a small colored panel showing an already chosen color, and a button. When you click the button, you get the color picker, which stores the new color in a multi-dimensional array, and then gets saved in the database.
I want to change the color of the small panel's background, but can't seem to do it. It does it fine when it's being assigned during list creation, and that works. I Dim'd the two panels in the global section so I can access them, but that doesn't work either... The color's being stored correctly, but I can't seem to get that panel to change on the fly. Now, I know it's contained in a panel, but I would assume that since it's been declared globally, I should still be able to access it directly.
This works when they're being created:
B4X:
'Set the Color from the array
If PassedIndex = 5 Then
pnl1.Color = setlist(5).Color
Else If PassedIndex = 11 Then
pnl2.Color = setlist(11).Color
End If
For the button click inside the list , which works but doesn't set the panel color (but it does, correctly, enter the proper value in the array):
B4X:
clrP.RGB = setlist(11).Color
tester = clrP.Show("Choose Display Color:","OK","","Cancel",Null)
If tester = -1 Then
setlist(11).Color = clrP.RGB
pnl2.Color = clrP.RGB
End If
Why can't I set pnl2.Color like this???
Last edited: