Listbox Selecting and arrays in VB6

Vextor
08-27-2004, 04:06 AM
I'm as new as a newbie gets to VB6 though I know some Javascripting ect I never really messed with "real" programming...

Now that that is settled here is what I am trying to accomplish.

I have a line up of listboxs set up with name age number feilds accross. I am making a database where I can add and remove and edit these fields. The two major problems I am haveing are as follows 1. I can't seem to find out how to get all the feilds in the same row to select when you select any of the feilds. 2. One field assigns a number to each person I need to be able to access a number that has been deleted again when adding a new person.

the program is basically a database.

on the first problem the example is

Number Name Age Weight
01 Smith, Josh 17 234
*02*****Doe, John***42****125

I want when I click on Doe,John or 42 or 125 the items to line up and all be selected so that I can click on edit and bring up all this information in my edit boxs.


on the second instance

Number Name Age Weight
01 Smith, Josh 17 234
02 Doe, John 42 125
04 Montana, Joe 54 109

When I add the next person to the list I want to be able to either make him 03 or 05 but not 01 02 or 03... without screwing up my arrays. would be happy with just being able to add 04 then 05 again.

Hope this is good enough explination. if not I can post what meager code I do have. I couldn't find this anywhere in the searches... but if you find it there I wouldn't mind getting a point that way either.

I think I posted this in the wrong section first ... sorry...

Peperl
08-27-2004, 04:48 AM
Yes. This post can go too in the database and report section but don't worry.

a question? you are using the listbox control to manage that database? Maybe anothers controls like MshFlexGrid fits bettrer to that purpose. With this you can access mor easily to each row and col of the values of a database

Vextor
08-27-2004, 05:05 AM
I've only gone through the basic tutorials using the tools I have already on the left hand side of my screen when veiwing the vb but I added something that looks like you were talking about to it that kinda looks like a spread sheet... I don't know that much about this control. Does it allow you to edit all the fields in a row ... say for example I want to sort them all by name first is it going to be easier? and umm .. also I'm trying to make it user friendly so no matter what feild in a row I click on it highlights the whole row. Also when compiled do I have to have Office Excel on my computer to use it.

Sorry for being an out of the box newbie... Everybody loves the new smell ;-)


Yes. This post can go too in the database and report section but don't worry.

a question? you are using the listbox control to manage that database? Maybe anothers controls like MshFlexGrid fits bettrer to that purpose. With this you can access mor easily to each row and col of the values of a database

Peperl
08-27-2004, 05:19 AM
Yes, the control I am speaking about is like a Excel spread sheet, you can edit the text of each cell individually. Apart, Flyguy (a member of the forum) make a lots of functions and add-ins to this, you can find them here: http://www.visualbasicforum.com/showthread.php?t=35110 and examples too.

Apart of this control there is another called SGRID 2.0 in a web called www.vbaccelerator.com that is very good too. I have using it a time and give me no problems, and you can download from here the source code and documentation.

I would take a look to the two links I gave you and see if that fits that what do you want to do.

This control has relation with Excel, so you don't have to get Excel in your computer. You have to add on your app the component Hireachical FlexGrid Control 6.0.

If you have some trouble with something please tell us.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum