Jump to content
  • Advertisement
Sign in to follow this  
slack

[.net] Custom listview/scrollbar

This topic is 4455 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm trying to customize the colors and padding for a listview with tiled items. Unfortunately, the colors of listview and scrollbar are pretty much hard coded, so the only solution I see is to use completely new components. So, does anyone know of a custom listview (or possibly similar control for just tiled items) or a custom scrollbar? Thanks!

Share this post


Link to post
Share on other sites
Advertisement
That's kinda what I'm trying to avoid. Also, there does not seem to be access to the scrollbar(s) associated with a listview, so those could not be drawn or created differently. If I can't find anything, I'll have to create my own simplified tiled list view control and a scrollbar control.

I really wonder why these controls have so little flexibility when it comes to customizing appearance. Some of the newer controls allow a Renderer object to be assigned, so I guess it's just the way the MFC controls are designed that WinForms builds on.

Share this post


Link to post
Share on other sites
Why do you want to avoid it? That's how custom apperances are done.

The scrollbar in a listview is accessible as a child window of the control. Get its HWND and you can get its WinProc and hook its paint events from there. A hassle, really. I'm not sure it wouldn't be less work to write a list view/scrollbar from scratch that paint the way you want them to.

Share this post


Link to post
Share on other sites
I'd prefer to avoid writing my own customized list view or scrollbar if there are components already out there that have the functionality I'm after. I'd rather not deal with drawing, selection, tooltip, etc code. At the very least, I wanted to change the color of a group title in a listview. Seems that it can't be changed! Forecolor certainly doesn't work.

Ah well, guess I'll just go ahead and write my own controls.

Share this post


Link to post
Share on other sites
//** The scrollbar in a listview is accessible as a child window of the control. Get its HWND and you can get its WinProc and hook its paint events from there. **//

Is it possible to have an example of code? My point would be to have a larger horizontal / vertical scrollbar on a listview.

Thanks
Nico

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!