how to get previous control in c#
there is a method to GetNextControl
but there is no method to get previous control
can any body tell me how could i get this
thanx in advance
how to get previous control in c#
there is a method to GetNextControl
but there is no method to get previous control
can any body tell me how could i get this
thanx in advance
GetNextControl(Control control, bool forward)
you can specify if you want to get the control forward or backward. For instance to get the backward control ofbutton1
, you can do:Yes, you can use it like:
GetNextControl() will return the previous control if you pass
false
in its second argument:I agree the method name is somewhat confusing, but you're arguably indeed looking for the next control, only in the other direction.