Groups | Blog | Home
all groups > dotnet compact framework > may 2007 >

dotnet compact framework : Scrollable Panel


Rick
5/12/2007 6:50:00 AM
I need to create a custom scrollbar that when used, it scrolls a panel
full of images with checkboxes beside them. In a desktop application,
I'd do it with ownerdraw. I guess this is a 2 part question,

1. How would I create my 2 by X list of icon/checkboxes
2. How would I use my custom vertical scrollbar to scroll it?

Rick
ctacke/
5/12/2007 2:41:13 PM
I'd create a owner-drawn list and put each icon/check pair in a ListItem.
That would get the scrolling nearly free.


--

Chris Tacke, Embedded MVP
OpenNETCF Consulting
Managed Code in an Embedded World
www.OpenNETCF.com




[quoted text, click to view]

Rick
5/12/2007 2:46:14 PM
An owner drawn list? I was going to do it with a panel and draw on
the panel, but I don't see an owner draw option for the panel like in
windows forms. Is there a caveat to doing this on the CF?

Rick

[quoted text, click to view]

ctacke/
5/12/2007 11:43:27 PM
Yes, a List. It's already got the underpinnings for most of what you want.
A Panel is simply a Container. A good example of an owner-drawn List is the
List2 control in the OpenNETCF SDF. I've used it to create lists where each
item contained an icon plus text of different font sizes and faces. I did
that in an afternoon while at a conference for a demo.


--

Chris Tacke, Embedded MVP
OpenNETCF Consulting
Managed Code in an Embedded World
www.OpenNETCF.com


[quoted text, click to view]

AddThis Social Bookmark Button