Hi,
I’m new to wxpython so my apologies in advance if this is a dumb question.
When I programatically highlight a line in a listctrl using .Focus and .Select it shows in a different colour (light grey) than if I click the line with the mouse (blue).
How do I make them both the same colour?
Regards,
Chris
This is because in addition to the mouse click selecting the item, it also give the widget the focus… so you should be able to add to your code:
yourListCtrlWidget.SetFocus()
···
On Wednesday, November 19, 2014 4:26:14 PM UTC-8, Chris Baldwin wrote:
Hi,
I’m new to wxpython so my apologies in advance if this is a dumb question.
When I programatically highlight a line in a listctrl using .Focus and .Select it shows in a different colour (light grey) than if I click the line with the mouse (blue).
Hi Nathan,
Thanks for your prompt reply to my query. Your suggestion worked fine.
Thanks again,
Chris
···
On Thursday, 20 November 2014 21:00:09 UTC, Nathan McCorkle wrote:
On Wednesday, November 19, 2014 4:26:14 PM UTC-8, Chris Baldwin wrote:
Hi,
I’m new to wxpython so my apologies in advance if this is a dumb question.
When I programatically highlight a line in a listctrl using .Focus and .Select it shows in a different colour (light grey) than if I click the line with the mouse (blue).
This is because in addition to the mouse click selecting the item, it also give the widget the focus… so you should be able to add to your code:
yourListCtrlWidget.SetFocus()