TechArena Community

TechArena Community (http://forums.techarena.in/)
-   Software Development (http://forums.techarena.in/software-development/)
-   -   How to create .net cf listviewitem font (http://forums.techarena.in/software-development/1222409.htm)

Rail racer 29-07-2009 10:54 AM

How to create .net cf listviewitem font
 
Is their any smooth way to add columns with comboboxes or text boxes to a
ListView in Detail mode in 2.0.? because i came across the list of breaking changes in the .NETCF 3.5 runtime and therefor i have decided to go for list view of an combo boxes, I need your opinion.

Adley 29-07-2009 11:11 AM

Re: How to create .net cf listviewitem font
 
Type: System.Drawing..::.Font
The Font to apply to the text displayed by the control. Drag and Drop operations in windows can be achieved using 3 simple events:.DragEnter, DragLeave, DragDrop. The default is the value of the DefaultFont property if the ListViewItem is not associated with a ListView control; otherwise, the font specified in the Font property for the ListView control is used.

Move Up Section:
tagCache = .Items(selIdx - 1).Tag
.Items(selIdx - 1).Tag = .Items(selIdx).Tag
.Items(selIdx).Tag = tagCache

pancham 29-07-2009 11:15 AM

Re: How to create .net cf listviewitem font
 
You also needed to handle the reflected notification message OCM_NOTIFY to perform my custom drawing. Read through the newly-converted-to-2.0 code and came up with a few things I'd like to work on. The original .NET 1.1 project consisted of a GPS Library that handled serial port IO and the NMEA Protocol

ListViewItem lvi = new ListViewItem();

lvi.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));

lvi.Text = "MessageRead";

listView1.Items.Add(lvi);

Bantu 29-07-2009 11:17 AM

Re: How to create .net cf listviewitem font
 
A ListView.ColumnHeaderCollection class stores the column headers that are displayed in the ListView control, Fortunately .NET 2.0 includes the new System.IO.Ports, so I figured I'd be able to use these. I started by opening the 1.1 Solution. The EventListView.cs contains the ListView derived control and implements the ICustomDraw interface.


All times are GMT +5.5. The time now is 12:25 AM.