Click here to Skip to main content
16,015,072 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Printing HTML Code Pin
Dave Kreskowiak9-Jun-05 2:49
mveDave Kreskowiak9-Jun-05 2:49 
GeneralRe: Printing HTML Code Pin
Adarsh Shah9-Jun-05 2:55
Adarsh Shah9-Jun-05 2:55 
General.config issues Pin
SamNasr8-Jun-05 10:02
SamNasr8-Jun-05 10:02 
GeneralReading 2.3GB of Sequential File Pin
Sidney Fuerte8-Jun-05 9:48
Sidney Fuerte8-Jun-05 9:48 
GeneralRe: Reading 2.3GB of Sequential File Pin
Sidney Fuerte9-Jun-05 4:32
Sidney Fuerte9-Jun-05 4:32 
Generallabel autosize Pin
soumyadev_kar8-Jun-05 7:09
soumyadev_kar8-Jun-05 7:09 
GeneralRe: label autosize Pin
Mitch F.8-Jun-05 17:05
Mitch F.8-Jun-05 17:05 
GeneralWrapping Row Headers in Listview Pin
Member 20299148-Jun-05 6:51
Member 20299148-Jun-05 6:51 
This is my first post to this discussion board so please forgive me if I am not yet following all your posting rules. Smile | :) I have a simple question about wrapping headers in a listview.
Is it possible to wrap a header row in a listview so that the header row wraps on words to two rows? I am reading in a text file that contains the header data and the row data but some of the headers are verbose so I need them to wrap to two lines. Code included below.

Private Sub PopulateTable(ByVal name As String)

        Me.Controls.Add(Me.ListviewTable2)
        FsrStreamReader = New System.IO.StreamReader("PreviousSaves.txt")

        'Use this variable to store a read line from the file
        Dim sLineFromFile As String
        FbReadingFirstLineOfFile = True

        'First of all clear the listview completely
        Me.ListviewTable2.Clear()
        Me.ListviewTable2.Show()

        'While our streamreader is not at the end of the file
        While FsrStreamReader.Peek <> -1

            'Read in the next line from our textfile
            sLineFromFile = FsrStreamReader.ReadLine()

            'If this is the first time that we read a string from the file, we take this string as the collection of columnheaders
            If FbReadingFirstLineOfFile Then

                'Split the string using the tabs between the columnheaders in the file
                'Loop trough our split collection and for every columnheader we add a column to our listview
                For Each sColumnHeaderString As String In sLineFromFile.Split(vbTab)
                    Me.ListviewTable2.Columns.Add(sColumnHeaderString, 125, HorizontalAlignment.Right)
                Next

                'We can reset this flag, the next lines is data, not columnheaderinfo
                FbReadingFirstLineOfFile = False

                'This is not in the first line from the file. We've read data now
            Else
                'Split the string using the spaces between the data chunks in the file
                'Add an item (and it's subitems) directly by using the split array.
                Me.ListviewTable2.Items.Add(New ListViewItem(sLineFromFile.Split(vbTab)))

            End If
        End While

        'Close the streamreader to free the file
        FsrStreamReader.Close()

    End Sub

QuestionHow to solve this? Thanks. Pin
shapper8-Jun-05 3:46
shapper8-Jun-05 3:46 
AnswerRe: How to solve this? Thanks. Pin
Dave Kreskowiak8-Jun-05 6:01
mveDave Kreskowiak8-Jun-05 6:01 
GeneralThread was being aborted Pin
macca248-Jun-05 3:30
macca248-Jun-05 3:30 
GeneralRe: Thread was being aborted Pin
Dave Kreskowiak8-Jun-05 6:00
mveDave Kreskowiak8-Jun-05 6:00 
GeneralCast from type 'DBNull' to type 'Integer' is not valid. Pin
msogun8-Jun-05 3:07
msogun8-Jun-05 3:07 
GeneralRe: Cast from type 'DBNull' to type 'Integer' is not valid. Pin
Dave Kreskowiak8-Jun-05 5:57
mveDave Kreskowiak8-Jun-05 5:57 
GeneralRe: Cast from type 'DBNull' to type 'Integer' is not valid. Pin
rwestgraham8-Jun-05 11:43
rwestgraham8-Jun-05 11:43 
GeneralPlease help regarding NGen Pin
prashant79_pawar8-Jun-05 3:00
prashant79_pawar8-Jun-05 3:00 
GeneralRe: Please help regarding NGen Pin
Dave Kreskowiak8-Jun-05 5:52
mveDave Kreskowiak8-Jun-05 5:52 
GeneralRe: Please help regarding NGen Pin
Dave Kreskowiak9-Jun-05 2:50
mveDave Kreskowiak9-Jun-05 2:50 
GeneralUrgent - Cant Lock Application Pin
kakomalis8-Jun-05 2:32
kakomalis8-Jun-05 2:32 
GeneralRe: Urgent - Cant Lock Application Pin
Dave Kreskowiak8-Jun-05 5:50
mveDave Kreskowiak8-Jun-05 5:50 
GeneralMapi controls Pin
smita_roy8-Jun-05 2:29
smita_roy8-Jun-05 2:29 
GeneralRe: Mapi controls Pin
Dave Kreskowiak8-Jun-05 5:39
mveDave Kreskowiak8-Jun-05 5:39 
Generalsp with temptables doesnt work in crystal reports Pin
7-Jun-05 23:40
suss7-Jun-05 23:40 
Generalremoving temporary files after setup Pin
7-Jun-05 23:27
suss7-Jun-05 23:27 
GeneralRe: removing temporary files after setup Pin
rwestgraham8-Jun-05 1:49
rwestgraham8-Jun-05 1:49 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.