|
-
Feb 4th, 2009, 05:24 PM
#1
Thread Starter
Addicted Member
[2008] NOt sure how to do this... grouping controls?
I'm building an app that list information. It will have list of each object going vertically, with the information about the object going horz across that line. My issue is I need to scroll through these lines, however each line will contain text, images, scroll bar, button, etc. Just common control items.
I first started off grouping them in a panel (panel being everything needed in that one line of information). I was thinking I could spawn more identical panels, one for each object listed. I also tried this using a UserControl (not sure if this is the right thing to do).
I just need a simple panel or area that I can layout my controls as need, then create identical panels as needed for each line. Then I can just scroll through then using some script to mod there location.
What is the best way to go about doing this? Panel? UserControl? I've tried the usercontrol, however I coudlnt get it to show on the form.
What do you suggest?
Dave
-
Feb 4th, 2009, 05:40 PM
#2
Re: [2008] NOt sure how to do this... grouping controls?
Take a look at the windows repeater control. I'm not sure whether it is available in 2008, or if you still need to get the VB PowerPacks from MS for this, but it might do what you need. Might not, too, as I have never used it, myself.
My usual boring signature: Nothing
 
-
Feb 4th, 2009, 10:37 PM
#3
Re: [2008] NOt sure how to do this... grouping controls?
 Originally Posted by Shaggy Hiker
Take a look at the windows repeater control. I'm not sure whether it is available in 2008, or if you still need to get the VB PowerPacks from MS for this, but it might do what you need. Might not, too, as I have never used it, myself.
The DataRepeater control is part of the VB PowerPacks, which is installed by default with VS 2008 SP1. For VS 2008 RTM or VS 2005 you will need to download and install.
-
Feb 5th, 2009, 11:39 AM
#4
Thread Starter
Addicted Member
Re: [2008] NOt sure how to do this... grouping controls?
But I remember doing this once before using user controls in VB6. I had an Image box, buttons, and a few labels. Now I dont remember for the life of me how I did it, nor how to do it in vb.net (using the express).
So if I were to use Custom Controls, I need this repeater? I just can call a new user control to show up?
-
Feb 5th, 2009, 06:16 PM
#5
Re: [2008] NOt sure how to do this... grouping controls?
If the repeater control will do what you want, then you can add it like any other control, but you'd have to play around with it. Since the control didn't come out with the normal VS release, it hasn't gotten much talk.
My usual boring signature: Nothing
 
-
Feb 6th, 2009, 11:19 AM
#6
Thread Starter
Addicted Member
Re: [2008] NOt sure how to do this... grouping controls?
I was able to get it working using an User Control. I was just calling it wrong.
I was able to get it to work like this:
(UserControl1 is the control I build including a button, label, and checkbox)
Code:
Dim k(10) As Control
.
.
.
For i = 1 To 10
k(i) = New UserControl1
Dim l As Point
l.X = 100
l.Y = 100 * i
k(i).Location = l
Controls.Add(k(i))
Next
Now the next thing I need to do is to figure out how to call the objects with-in the control (like knowing when a button in the control was presses, or modifying text within the control, etc.) If you know this will not work, please help me save some time by calling me an idiot
Any takers?
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
|