Columns ... Listview ... Listbox ... ... ...
Hi everybody!
I am sure everybody knows the detail view of the explorer!
Is there anything that is just like that?
I tried it with the listbox control , but i there are no tabs! Besides ... i couldnt get anything in the other rows.
Then i tried it with the listview and it was just the same. I was able to put some stuff in the other columns, but i could move the items around like the icons on my desktop.
I tried the search machine and allapi.net before this thread, but either couldnt find anything or couldnt understand it.
Do you guys got some genius homemade ocx that is just fixing my problem ... or just got a hind
Greets Ben
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Resizing Columns In One Listview To Automatically Resize Corresponding Columns In Another.
I'm currently building the front end to a VB6 application. This app is largely based on entering data into a Listview. In order facilitate data entry, I need to create an editable row beneath the listview, comprising of text boxes(unless there is a better method) and an "add" button. The problem is that when a column in the Listview is moved or resized, the array of textboxes need to reflect this change of order/size, as each textbox needs to appear beneath its corresponding column. Also, if the listview contains a large number of columns, and therefore a horizontal scrollbar, the textboxes will need to scroll also... I would be very grateful for any help..! Thanks...
Adding Columns To A Listview That Already Has Columns
Hi
I'm new to VB6 (I usually program in VB.NET but have been asked to make an enhancement to a VB6 application).
I have a listview which has columns defined within it in the designer. The code I am looking at then retrieves data from a db and puts it into the listview.
I've been asked to add another column in the middle of the listview e.g. there are 10 columns defined in the designer and this new column needs to go at position 6. However, the data that needs to go in the new column needs to come from a different query than the one that fills the other columns. I therefore thought that the best way to do it was fill up the original columns and then slot in the new column and fill it from another query. I've been searching around but can't find any example of how to do this.
Please can anyone help, or suggest a better way to do it? Thanks!
ListView Columns
How do i add columns to a ListView and also how do i insert information into a listview box? For my listview i require 3 columns: 'Artist', 'Track' and 'CD'.
I have tried adding columns using the properties dialog, but they don't appear when i run the form.
Any help is much appreciated!
James
Listview Columns
if I do lvwListView.listitems.additem ,, "test"
it adds an item in the first column of the listview
how do i add data in the second column of a listview
ListView Columns
I have four columns in a list view, each taking up 25% of the available space. When the form resizes, I am successfully resizing the ListView, but how do I resize each of the columns back to 25% of the new size.
I have tried ListView1.ColumnHeaders.Items(0).Width, but that results in a Out of Bounds Error. I have also tried with Items(1) with the same result.
Any idaes
Listview Columns
thought i would have a go using a listview in report mode.
i must be missing something and see what.
when i insert a column and give it a caption it will insert it but then i have 2 columns.
i wanted 3 columns altogether but it shows 4, always 1 more.
what am i missing ?
thanks
thingimijig.
ListView Columns
If I have 2 columns in a ListView (set to Report), how can I add data to them? I have tried for ages, and I cant figure it out.
Columns To A ListView
Is it possible to add Columns to a ListView manually or does it have to be done at runtime?
Two Columns In Listview
sorry, this may be a silly question but its very frustrating,
all i need is for my listview to display two columns of data, taken from a query currently i can achieve one column but i need to add another with "LastName" cheers, here is my code so far
Code:
Set cn = New ADODB.Connection 'we've declared it as a ADODB connection lets set it.
cn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source= c:vdmcertymate VBdatadata.mdb" 'this is the connection string explained in the notes section.
cn.Open
Set rs = New ADODB.Recordset 'as we did with the connection
rs.Open "qryEmployees", cn, adOpenKeyset, adLockPessimistic, adCmdTable 'opening the recordset explained in the notes
'Code to populate the listView
While Not rs.EOF
lstvEmployees.ListItems.Add , , rs.Fields("FirstName").Value
rs.MoveNext
Wend
rs.Close
Set rs = Nothing
cn.Close
Set cn = Nothing
Me.MousePointer = 0 'Resets Mouse Pointer
oh. and how do i get the listview to add a verticle scrollbar?
Listview Columns
this is a quick question really can u parse a site out into a listview with columns for different info from the site?
its a bit tricky to explain and show you as i want to connect to a site in inet grab the source parse out some hardware information,how many on the site, and how many on order and the price into one listview nicely 'ordered with column headers..
i can connect and parse the hardware info into the listview fine but i was wondering on how to do the other parts but because u need an account on the site i cant show u it however here is some of the info from the source (the parts ive gotten out and im needing to parse out..
HTML Code:
>10/100MBPs NIC</a></td><td align="right">4.96 £</td><td align="right"><div class="g">4</div></td><td align="right"><div class="b">2<
theres say part of the info from the source ive gotten the 10/100 "part" fine but i need to get the "4.96, class="g">4< amount and class="b">2< amount (which change obviously...
is this possible to parse into a listview with columns to save me having to go to the site each time and then get those parts of the info which really defeats the purpose of the program? or do i need to use a different control other than listview?
any help or tips would be great
Listview With Different Columns?
In Listview I want to create 5 columns each having column header as "S.No", "From", "Subject", "Date", "Time"
I created Column headers in design time but they are not getting displayed? Also I want that S.No column to be having Checkboxes. How to do that? Thanks.
Listview Columns
I can only select the index column out of my data when in a listview. Code and input follows: Also I cannot input files other than the one I used to test with, of the same format?! (Not the one attached)
Option Explicit
Private Sub Form_Load()
Dim K As Integer
Dim itmX As ListItem
Dim clmX As ColumnHeader
K = 1
Set clmX = ListView1.ColumnHeaders.Add(, , "Column 1", ListView1.Width / 5)
ListView1.BorderStyle = ccFixedSingle
ListView1.View = lvwReport
ListView1.ListItems.Clear
Dim FF As Integer
Dim strLine As String
FF = FreeFile
Open "C:sheet.csv" For Input As #FF
Do While Not EOF(FF)
Line Input #FF, strLine
AddListView strLine
Loop
Close #FF
End Sub
Private Sub AddListView(S As String)
Dim Ar() As String
Dim i As Integer
Ar = Split(S, ",")
If UBound(Ar) > ListView1.ColumnHeaders.Count Then
For i = ListView1.ColumnHeaders.Count To UBound(Ar)
Dim clmX As ColumnHeader
Set clmX = ListView1.ColumnHeaders.Add(, , "Column " & i + 9, ListView1.Width / 5)
Next
End If
Dim lv As ListItem
Set lv = ListView1.ListItems.Add(, , Ar(0))
For i = 1 To UBound(Ar)
lv.ListSubItems.Add , , Ar(i)
Next
End Sub
Private Sub SortListView(ByRef List As ListView, ColHeadIndex As Integer)
Dim lcv As Long 'Loop Control Variable
With List
' Make sure the Sorted property is set to true
.Sorted = True
' Sort according to the colum that was clicked (off by one)
.SortKey = ColHeadIndex - 1
' Does the column already have an icon?
If .ColumnHeaders(ColHeadIndex).Icon = 0 Then
'No, So we will assume this column is not sorted
' Set to Ascending order
.SortOrder = lvwAscending
' Set the sort order to descending
.SortOrder = lvwDescending
Else
' Otherwise sort into ascending order
' Set to Ascending order
.SortOrder = lvwAscending
End If
' Refresh the display of the ListView Control
.Refresh
End With
End Sub
Listview Columns
when using a listview in report mode, do you always have to have a blank list at the end.
when i add columns through its properties there is always another blank one, and if i try and size it to fit the size i want it either still shows a bit of the blank one or i get rid of it and a scrollbar appears.
any ideas!
thanks.
thingimijig.
ListView Columns
Sups,
I got a listview with two columns on it.
I forgot how to add item to each column.
How can I do that?
tnx.
ListView And Columns
How can I set the column width to be that of the text? I tried:
VB Code:
lstOutput.ColumnHeaders(1).Width = TextWidth(strText)
But that didn't work...
Any ideas?
ListView Columns
I have 5 columns in the ListView, all were added via code at runtime. Now, for example, I want to remove column with index 2, problem is, the data from the last column disappears and all the data gets shifted so column with index 3 will now have what column with index 2 had before removing. Is there an easy way to remove column and all the data in it (like Access 2000 does) or do I have to go item by item moving subitems from each column to previous one making 2 last columns identical in data but not column header text, then it should work, because last column will be removed anyway. Here's when another problem comes up, if I add a new column, the data from last column will become visible again, so I really didn't remove column completely, just the column header and made data in the last column invisible. Maybe when I'm adding columns, I need to specify a key or index or what not to remove it completely? I just want to remove the whole column (header and data in it) completely, and shift all the columns to the left; and when I add a new column, I want it to be "blank", meaning no data in it. Of course, it all can be done via long code. I have to set each item's subitem of the new added column to "", etc. but there should be an easier way!
Thanks
Listview Columns
I have a listview with three columns. I want to load a table of names into the listview, putting last names A-F in #1, G-S in #2, and T-Z in #3.
I know how to loop through the table and load the names, but I don't know the listview code to separate the names into columns. Any ideas?
Listview With 3 Columns Help
Can anyone tell me how I can display a comma-separated textfile in a listviewbox with 3 columns when the form loads?
The textfile contains the following data:
script1, path1, time1
script2, path2, time2
script3, path3, time3
......
Listview Columns
okay,
how do I prevent the user from resizing the columns in the listview so that hidden columns (id numbers) can't be 'stretched out' and viewed?
David
Listview Columns
how the heck can i set up a list box so i can have a few columns?
lets say 1 displayign a url
anohter for the date
another for soemthign else?
thanx
?
Listbox Columns
Code:
List1.Columns = 2
List1.Additem("1")
how do you get it to the other column?
Thanks
-jaden
Listbox With 2 Columns
Hmm,
Any benefits from the "boundcolumn property" in regards to input/output?
Regard,
Eric
ListBox And Columns?!?!?
I have 2 column's in my list.
I would like to add Text from Tex1 to the left side and text from Text2 to the right. Is this possible? How do I go about doing this?
Thanks in advance
Columns In Listbox
Hi,
Is it possible to add items to a list box that has columns and can you add the data specifically to a column like below
for example:
Name Age Address
David 56 Any Address
Any Name 99 Any Address
any help if you understand this concept!!!!!!
Columns In A Listbox
How do you place data in the second, third, etc. column of a listbox? Here is my code to put data into the listbox, but I can't figure out how to put it in a designated column...
Do While Not Adodc1.Recordset.EOF
List1.AddItem Adodc1.Recordset.Fields("Lastname").Value & vbTab & Adodc1.Recordset.Fields("Firstname").Value & vbTab & Adodc1.Recordset.Fields("Extension").Value & vbTab & Adodc1.Recordset.Fields("DeptNumber").Value
Adodc1.Recordset.MoveNext
Loop
ListBox With 2 Or More Columns
Hello,
I need help for the following topic:
When I used VBA, I could use a ListBox with 2 or more columns.
Now I use VB6 and I can't find this option :-(
As far as I know, I can use a DataList instead a ListBox.
I already create a DataList but I have no idea how to configure a List with 2 or 3 columns :-(
How can I add a MyArray(x,y) to the DataList.
For example:
MyArray(0,0) = Name
MyArray(0,1) = Company
MyArray(0,2) = ID
Appreciate you help
Stefan
Columns In Listbox
How do I go about placing an item into the next column of a list box? What I am doing is gathering data from a database and placing the returned data into the the listbox. I want to be able to separate the data and place the data into its own column. I've tried using one column and using tabs, but it does not distribute things evenly since some results might be null. I don't want to use a List View or a data grid. I don't want to be able to select just a column, I want the entire row selected, that's why I want to use a list box. A data grid might work, but it will need to return the index number of the row in which is was found. Any suggestions???
Listbox Columns
I have this piece of code from a seminar I attended. I am trying to use it as a jumping off point for a project. However I cannot get this original code to work.
The form has a listbox (list1) and a command button(command1)
When command1 is clicked I just want to see the column headers in the listbox.
When I run the code this way I get an "Argument not optional" highlighting .List()
Code:
'First row in array will be labels.
dim LoadArray (0,2)
LoadArray(0, 0) = "PH"
LoadArray(0, 1) = "PAIR"
LoadArray(0, 2) = "NAME"
list1.list()=loadarray
with the exception of changing the string values for each array item the code is as it was in the seminar where I saw it work.
I have the columns prop. set to 3 for the listbox. Is there something else I'm missing?
As always thanks in advance for your assistence
Bart
ListBox Columns?
How would I make it so that a list box would have those button separators at the top of a list box? And how would I use the add listbox function to add text under the specified separator
Listbox Columns?
I'm doing a sort of file viewer thing with the file / dir listboxes and normal listboxes.
I choose a path and click a button then it loops through and adds each dir / file to the listbox, but is there a way to add columns that hold:
date modified & time modified & wether its a dir or file & filesize in kb & then name of dir / file
I've got the wether its a dir or file & filesize in kb & then name of dir / file but I need it in columns so it can be lined up & look neat.
Listbox With More Columns
Hi,
I have 60 items to be listed either in a listbox or in a textbox.. I want every 20 items listed in one column so that I can see them all on the form..So how should I modify a list box for my purpose...And Can I use a textbox in the same way ,too ?
Thanks
Listbox Columns
For school I need to make a listbox with two columns that can be added to, but I have searched the web and I cannot find any information that would explain to me how to do this. I have made columns, but I cannot figure out how to add to a column other than the first. I am using VB 5.0.
Listbox Columns Help
I have set a listbox to contain 2 columns, and the data on the second column doesn't show. You have to use the horizontal scrollbar to scroll right to the data in the second column. But if i set the number of columns to 3, it shows the first two together, but when i click on an item in the second column, it scrolls the list box over to show only the second column. What i want is to display both columns at the same time and when i click the second column, i want it to stay in place, not make the list box scroll. Any suggestions?
2 Columns In Listbox
Hi, i have a list box but dont wuite understand how you use the 2 columns option. I have set it to 2 columns and want only column 1 showing, in this will be filenames, and in the second not showing column will be that filenames directory. How do i do this?
To add the files to the box i have a filelist box and i add files from there.
Thanks.
Listbox Columns
I have a list box I am populating during runtime. What I would like to do is have the listbox populate in another column, say the 2nd or thrid one over. something like this
VB Code:
list1.column2.additem "something"
This obviously does not work. Is it possible?
thanks
ListBox Columns???
I was using a list view before, but now I WANT to use a listbox... how can I use the columns, so that I can put a word in the first column, then a value in the next? Right now it just looks like the columns are just to stop from vertical scrolling, but maybe its just me...
Any info on this is appreciated!
ListBox Columns
Can i insert another column to a listbox. I mean:" I NEED TWO COLUMNS TO BE DISPLAYED?
Does anyone know any control out of vb?
Listbox --> Columns
If my listbox have more than one column, how can I choose to wich column I want my value?
If I use this everything ends up in the same column.
List1.AddItem "Test1"
List1.AddItem "Test2"
Listbox Columns
How do I create a listbox with more than one column, and get it to display column headings for all the columns?
How To Do LISTBOX COLUMNS
IF i have 3 colums and want to add a line to a text box, how can i make the first column of that link "A", the second "B", and so on... Thanx for any help i will be on AOL INSTANT MESSANGER IF YOU WANT TO CONTACT ME
====================[ AIM: sirXris ]=======
ListBox With Columns Set To Two
I'm having a problem with the listbox control.
If I set the columns to two, and set the list index to 1 (the last item) the listbox always scrolls the first item off the screen.
This doesn't happen if the box is high enough to have the two items on top of each other, but If I use a longer box with the two items side by side and set the listindex to the last item, it scrolls the first one to the left.
This doesn't happen for numbers higher than three.
If anyone has ever had this problem and knows of a possible solution let me know.
Thanks
Columns And A Listbox?
How do you use columns in a listbox?
Theres a property but how would you add data to it?
Columns In A Listbox
Hi all
Is there any way I can divide a texstring into columns in a listbox??
My problem is this
I add several rows of text to the listbox
In each row the words are seperated with vbTab
But it doesn't look good
Ex.
XXXXXX YYYYY ZZZZ
XXXXXXX YYYYY ZZZZ
XXXXXXXXX YYYYY ZZZZ
XXXXXX YYYYY ZZZZ
that is I want them to be in columns
C.
LISTBOX ( 2 Columns )
I make a 2 column list box and I want to do that:
TXT_add1
TXT_add2
| TXT_add1 | txt_add2 |
I want to put in the list box and Get data my data from the list box after..
can someone help ?
Listbox With More Than 10 Columns
I use a form20 control listbox, where multiple columns can be filled (columncount = 15)
I fill in these columns FORM.LISTNAME.LIST(LISTINDEX, COLUMNTOBEFILLED) = "My text for this column"
Only when the COLUMNTOBEFILLED reaches 10 (=11th item in a row) I get an error that it is an invalid property or something
Any ideas?
Two Columns In My Listbox
I'm not sure if this is possible.
I have a table that has driver license and name information. I'd like to use a listbox to display both. Can I create two columns with this information? I need to treat them as different columns because if my user select an entry from a list, then on a second listbox there would be ticket information. So my key field that I need to select the ticket information is the driver license number.
Thanks a lot for any help you guys can give me.
|