SpriteHand
Module Border
  Mimicking a Data Repeater Control in WinForms
Module Border
Location: BlogsAndy's Blog    
Posted by: host 1/4/2006 8:03 PM
VB6 had the cool Data Repeater which allowed you to create an ActiveX control and databind it so that it would show an instance of the user control for each row in your record set.
 
This cool control is missing from .NET, but it's pretty easy to mimick this functionality. Just create a Panel, set its AutoScroll property to True, and use the Controls collection to dynamically add instances of the user control. You will need to also track the Y Offset of each control you add to push down each instance.
 

Dim m_YOffSet As Integer = 0

Public Sub AddAddress(ByVal AddressId As Integer)
    Dim ucAddress1 As New ucAddress
    ucAddress1.Address = "123 University Lane"
    Panel1.Controls.Add(ucAddress1)
    ucAddress1.Visible = True
    ucAddress1.Top = m_YOffSet
    m_YOffSet += ucAddress1.Height
End Sub

Permalink |  Trackback

Title:
Comment:
Add Comment   Cancel 
Module Border Module Border
Module Border
  Blog_List
Module Border
Module Border Module Border
Module Border
  Subscribe
Module Border

RSS

Module Border Module Border
Module Border
  Diversions
Module Border

DESTROY ALL INVADERS
A scrolling shooter game where the objective is to destroy the invading UFO's flying over a neighborhood of your choosing. Imagery provided by Microsoft Virtual Earth. Created using Silverlight 2.
PLAY IT

INFO AND CODE



HOOK SHOT
This little basketball game was submitted as an entry to the TeamZoneSports Silverlight Contest. Created using Silverlight 2 and the Farseer Physics engine.
PLAY IT

INFO AND CODE



SORT THE FOOBARS
A game where you need to sort the good foobars from the bad ones. Created using Silverlight 2 and the Farseer Physics engine.
PLAY IT

MORE INFO



POLYGON PHYSICS DEMO
A demo showing polygon physics where the user draws physics objects with the mouse. Created using Silverlight 2 and the Farseer Physics engine.
PLAY IT

MORE INFO



SILVERLIGHT ROCKS!
Destroy the asteroids before they destroy your ship! Created using Silverlight 2.
PLAY IT

INFO AND CODE



FISH GAME
A simple game of harpoon-the-fish. Written using the AJAX Sprite Toolkit.
PLAY IT

INFO AND CODE

Module Border Module Border
Module Border
  Search_Blog
Module Border
Module Border Module Border
Module Border
  Blog_Archive
Module Border
Module Border Module Border
Copyright (c) 2008 andy.beaulieu.com - Login