chaosagent
MIS
Hi All,
I am having some difficulty with a tlistview component. I want the user to be able to make multiple selections and whole rows to be selected not just cells. OK no problems there so far just set a few design time properties. However I also want users to be able to short cut the process by checking a checkbox below the listview.
What I want to happen is for all the items/subitems to take on the selected state and for rows to go the default selected navy blue colour. This is where I am having difficulty. Setting the items to selected doesnt seem to be a problem and I do that with a loop setting the item/sub items to selected as it iterates but I cant get the colour to change to what I want. The listview rows give a cue they are selected by going grey instead.
I have tried playing with onCustomDraw etc events repainting the canvas when state is cdsSelected but Im not having much joy.
If I run the app and use the mouse and hold down ctrl then multiselecting paints the items the default blue which is what I want to happen and does so why doesnt a code call to set each item to selected from another component do the same?
Cheers All
L
I am having some difficulty with a tlistview component. I want the user to be able to make multiple selections and whole rows to be selected not just cells. OK no problems there so far just set a few design time properties. However I also want users to be able to short cut the process by checking a checkbox below the listview.
What I want to happen is for all the items/subitems to take on the selected state and for rows to go the default selected navy blue colour. This is where I am having difficulty. Setting the items to selected doesnt seem to be a problem and I do that with a loop setting the item/sub items to selected as it iterates but I cant get the colour to change to what I want. The listview rows give a cue they are selected by going grey instead.
I have tried playing with onCustomDraw etc events repainting the canvas when state is cdsSelected but Im not having much joy.
If I run the app and use the mouse and hold down ctrl then multiselecting paints the items the default blue which is what I want to happen and does so why doesnt a code call to set each item to selected from another component do the same?
Cheers All
L