View Single Post
  #3 (permalink)  
Old 07-03-2007, 06:48 AM
ccoonen ccoonen is offline
PT Staff
Awards Showcase
Quality Tutorial Quality Tutorial Quality Tutorial Quality Tutorial 
Total Awards: 4
Join Date: Jun 2007
Location: Wisconsin
Posts: 317
iTrader: (0)
ccoonen is on a distinguished roadccoonen is on a distinguished roadccoonen is on a distinguished roadccoonen is on a distinguished road
Yes, in VB, getters/setters and called Properties. The Private variable holds the data for color value, the Get returns the private variable, and the Set actually sets the the private variable. We also hook into setting other control properties in our set... so when you set the Property "TextBoxBackgroundColor" to Color.Red for example, it will set all 5 controls and the internal variable so you could retrieve it again later. This way it is realtime in the VisualStudio GUI and you can use the properties in the properties window to see your changes instantly

_TextBackgroundColor is my own variable... showing you can extend these user controls to anything you want...
Reply With Quote