When creating a regular maxscript listbox a highlighted item remains highlighted even when the UI element is not active/in focus. On most machines this is a highlighted blue color.
Using .net listview the highlighted item will turn white when not active/in focus. I believe this is because the colors are based off of the Windows system colors. I’d like the listview to be always highlighted even if not in focus since the user should easily see what is clicked when dealing with other parts of the UI.
While different forums (CGTalk for example) mention the problem – I have yet to find a good solution. Currently I have written a horrible hack that that re-focuses the UI element when the user clicks on different parts of the UI. For example, I have a dotNetControl named dnc_listview and call dnc_listview.focus(). I’ve also tinted the background so the white shows up better and still suggests to the user that something is selected.
Anyone here deal with this issue and figured out a more elegant solution?
[QUOTE=Kameleon;6955]Have you tried the HideSelection property set to false? Dunno if it works thow.[/QUOTE]
Hi Kameleon, thanks for the response. I am currently using the hideselection = false. This is allowing the blue highlight to at least turn to white, but I would like to override that secondary color change when the listview is not in focus.
This unfortunately leaves me in my current situation. When in focus - the highlight is blue – otherwise it turns white. I would like to override that system color if possible.
I’m believe this is controlled by the user’s color scheme (in XP, Control Panel -> Display -> Appearance). Try changing it and see what happens (and if that doesn’t work, try changing on the Themes tab). I’m not sure what aspect of the scheme controls that color, though.
I want to roll out the script on different users machines and don’t want to mess with their color schemes. After doing some reading on different forums I tried implementing the following solution:
– instantiate the control (user still needs to set it up – but I’ve skipped that part.)
dotNetControl dnListView “System.Windows.Forms.ListView”
– hack to keep focus on the listview
timer refresh “refreshUI” interval:100
on refresh tick do
(
dnListView.Focus()
)
Unfortunately it obviously pulls focus all the time from other areas of the UI.
I also tried a .net listbox which does do proper highlighting control, but it doesn’t appear to support the bold and italics and a slew of other nice UI features that the listview has.