views:

167

answers:

3

Hello.

I have been playing with Compact Framework lately and i need some advice.

I have a collection of items. One of the properties on each item is a string type that holds XML. This XML defines image, font, style etc...

Im looking for a control (similar to listView) that would replace listBox control.

Im not satisfied with listView control, because it is very limited on items level.

The control has to be dynamic enough so that my parser could parse the XML and customise the control. For a start i would like to show an image and perhaps some font styles for each row in the control.

Here is a sample what im trying to achieve:

alt text

Any suggestions?

A: 

Well you could write your own Custrom Control providing the desired interfaces.. I'd propose to inherit from ListBox.

PaN1C_Showt1Me
before i do that, i want to make sure that there isnt something out there already. Im only learning this stuff, so i think there are far more experienced ppl out there with same problem. I found "owner-drawn listView" that im gonna give it a try. If some1 has a solution please post it here. I would appreciate it alot.
no9
+1  A: 
Mr Roys
thanx. i will look into it
no9
A: 

I have tried ListBox2 as Mr.Roys suggested. I like the concept and the fact i can override onPaint and onDrawItem events. But i think I am missing something. I want that each item that is drawn has various height. I looked into it and i found that i have to set DrawMode to OwnerDrawVariable in order to achieve this. But as i see i can only choose Normal and OwnerDrawFixed. Can i somehow do this or will i have to write a control from scratch?

no9
Edit your original question, don't add an answer.
ctacke
sorry there was no addcomment link yesterday.
no9