Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

user interface question (Novice programmer)

Status
Not open for further replies.

MDA

Technical User
Jan 16, 2001
243
0
0
US
I would like to create an interface I have seen many times in other apps. I have a small app that users will enter groups of info. I want the main form to have a column of instructions on the left, the open combo boxes on the right and <next> and <previous> buttons on the bottom right. There are about three groups of info, so the instructions and open boxes should change three times, as the user clicks <next>.

What is the best approach to doing this? I started putting all controls on one form and was just hiding and showing as necessary, but this seems very sloppy. What is the common method? MDI form? or active x? or ????

Any ideas are greatly appreciated....

Regards,

Mike
 
Mike,

You may consider using a tab control, they work well for this kind of thing. However, to do what you say you want to do pick the first set of combo boxes to show and set their visible property to &quot;true&quot; and the rest of them to &quot;false&quot;. When the user clicks next, then set the properties for the first group to &quot;false&quot; and the next set to true, etc.
This could be made easier by using the index proberty as well. Called a control array. You could have three combo boxes 1, three combo boxes 2, and three combo boxes 3. For each of the combo boxes 1, set the index number to 1, 2, and then 3. This makes it easier to refer to them in a loop. Then you can do like:


Dim I As Integer ' Needs to be in declarations section so value is kept afer leaving ' procedure.

Dim J As Integer ' This can be at start of procedure

I = I + 1
For J = 1 to 3
If I = J then
Combobox1(J).visible = true
Combobox2(J).visible = true
Combobox3(J).visible = true
Else
Combobox1(J).visible = false
Combobox2(J).visible = false
Combobox3(J).visible = false
End if
Next J
If I > 2 then I = 0
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top