Themes!

Published November 23, 2005
Not the www2 theme though - a couple of XP theme glitches.

First up is the ListView control in .NET 2. If you switch on gridlines and scroll with the arrows on the scrollbar, it leaves the gridlines behind as nasty artefacts. This is what I came up with - and it appears to work.

Create a new class that inherits from ListView. Then add to it this code:

        /// <summary>        /// Hacky override to fix the garbage lines.        /// </summary>        protected override void WndProc(ref Message m) {            if (m.Msg == 0xF) { // 0xF is WM_PAINT                GridLines = false;                GridLines = true;            }            base.WndProc(ref m);        }


...compile and that new class should appear in your toolbox. Use that instead of the normal ListView control.

If anyone could come up with a better solution, I'd love to hear it...

The other theme bug appeared last night in XP.


Click for big.


I guess it can't remember if it's using Windows Classic or Windows XP styling?
Previous Entry Latenite
0 likes 3 comments

Comments

Comments are shown oldest first so the discussion reads top to bottom.
........................................
that xp bug looks really strange O_o

btw: have you seen this before: http://www.pouet.net/prod.php?which=17673 ?
November 23, 2005 03:52 PM
Rob Loach
I hate you and your crazy ass dual monitor system.

Oh, and remind me to get your to tell me what controls and stuff you used for your editor... Would be cool to make a script editor for a scripting engine type thingy thing thingy.....
November 23, 2005 11:12 PM
benryves
@Rob: The control is just a modified RichTextBox. The original version was pretty buggy and very slow - I've removed the bugs, but it's still pretty slow (at least it now only rehighlights lines of text that have changed!)

@philipptr: It's a very nice demo [smile] (Looks great on hardware). He's managed to switch palette colours at the ends of scanlines, so has the timing down pretty tightly - not something I ever managed to get quite right!
November 24, 2005 07:10 AM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!