Newb question about controls
-
I've got a spin box, how do I set it so that it controls the current value of one of the attributes of my ScrollableControl?? ------------------------------- To begin at the beginning
Presumably the spin box control raises an event such as SpinBox1.PositionChanged or something similar (Check the controls documentation). You need an event handler for this in pseudocode it is something like this:
Private Sub SpinBox1_PositionChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SpinBox1.PositionChanged 'Code to handle event here. End Sub
The event handler should pass data back in the Event args that you can use to set the attribute of the ScrollableControl or you could use the SpinBox controls property to set the value:Private Sub SpinBox1_PositionChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SpinBox1.PositionChanged ScrollableControl.MyAttribute = e.Position 'Or ScrollableControl.MyAttribute = SpinBox1.Position End Sub
If you are using VS.Net intellisense should point you in the right direction. What are the controls that you are using and what are the properties, events and methods that you wish to change on them? Jim