private int FindButtonIndex() { for (int x = 0; x < parent.Buttons.Count; x++) { if (parent.Buttons[x] == this) { return x; } } return -1; }