|
-
Jun 24th, 2005, 11:04 AM
#1
Thread Starter
Junior Member
ListView Problem
I have a form with a ListView on it. I have created a column and added text to it...added some spaces and a time stamp so that the width is around 75
characters long. When I open up the form in an emulator it looks as it
should. However, when I deploy it to my device and open it up...the colum
looks like the width is 0 and I have to stretch it to see the text.
Any ideas on why this may be happening?
Thanks
-
Jun 27th, 2005, 03:27 AM
#2
Fanatic Member
Re: ListView Problem
try this
VB Code:
'inside the form_load
lstview.Columns.Add("My Column Name", "210", _
HorizontalAlignment.Left)
'in a button click event
Dim ls As New ListViewItem("Test1")
lstview.Items.Add(ls)
Barry
Visual Studio .NET 2008/Visual Studio .NET 2005/Visual Studio .NET 2003
.NET Framework 3.0 2.0 1.1/ASP.Net 3.0 2.0 1.1/Compact Framework 1.0
SQL Server 2005/2000/SQL Server CE 2.0
If you like, rate this post
Compact Framework for Beginners
-
Jun 27th, 2005, 08:07 AM
#3
Thread Starter
Junior Member
Re: ListView Problem
Thanks Strider,
I ended up figuring this out after a few beer:
lvwColumn = New ColumnHeader
'lvwColumn.Width = -1
'Set its text to the name of the field
lvwColumn.Text = "Scan Data Start Time: " & Now & Space(95)
'add Column to ListView
ReaderDataListBox.Columns.Add(lvwColumn)
All I did was comment out the lvwColumn.width = -1. I'm not sure why that didn't work on the device but did on the emulator. I guess it is redundant anyways.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|